当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3882:Strange Galaxy

题目描述
ACM space explorer discovered a special space in an observation. There are many strange stars in it, and we call them S-stars. Each three of them, such as A, B, C, can form an opaque triangle area ABC, and the area can absorb the light inside O-ABC for the point light source O which made O can only light the space except an infinite triangular file shaped space whose boundaries are ray OA, OB and OC.

In order to know the size of the area that a point light source O can light at a specific direction, we normally choose a plane P as reference, consider O’s invisible area in P. If the area size is infinite or 0, we consider the direction as a bad one. We take this direction as a reference only if the area size is finite and non-zero.

Then we’ll give you another set of normal stars, we’d like to know the percentage of those couldn’t be lighted among all the normal stars.
输入解释
Multiple cases, no more than 100, test case ends with four zeros.
All numbers are integers, in each case:
Line 1: a, b, c and d, represent the reference plane: ax+by+cz=d;
Line 2: n (0<n<=100), number of S-stars
Line 3 – n+2: x, y and z, coordinate of each S-star
Line n+3: x0, y0 and z0, coordinate of point light source O
Line n+4: m (0<m<100), number of normal stars
Line n+5 – n+m+4: x, y and z, coordinate of each normal star

Notice: S-star and normal star may coincide. We guarantee that if there exist S-stars, they are not all at the same plane. The point light source is not on the reference plane and doesn’t coincide with other stars. The absolute value of each coordinate number is below 10000.
输出解释
For each test case, if the invisible area size is 0, output “ZERO”, if it’s infinite, output “INF”, otherwise output the percentage described above, rounded to two decimal numbers.
输入样例
0 0 1 0
8
1 1 1
1 -1 1
-1 1 1
-1 -1 1
1 1 0
1 -1 0
-1 1 0
-1 -1 0
2 2 1
4
0 0 1
0 0 0
0 1 0
1 0 1
1 0 0 -2
8
1 1 1
1 1 -1
1 -1 1
1 -1 -1
-1 1 1
-1 1 -1
-1 -1 1
-1 -1 -1
2 0 0
10
1 0 0
2 0 0
-1 -1 1
1 1 -1
0 0 0
2 0 0
3 0 0
2 2 2
1 -1 -1
-1 1 -1
1 1 1 1
0
0 0 0
1
1 1 1
0 0 0 0
输出样例
INF
40.00%
ZERO
来自杭电HDUOJ的附加信息
Author hzw0106
Recommend lcy

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3882

最后修改于 2020-10-25T23:07:52+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65768/32768K(Java/Others)