2435. The sniper

单点时限: 3.0 sec

内存限制: 256 MB

You are an able sniper. You’ve never made a mistake in this job. Howeber, you cannot shot invisible point. So the target decide to use a lot of balloons to make a lot of invisible points. Your task is to write a program which judges whether it is possible to kill a target in the given state. All balloons are sphere and you are always in the origin.

输入格式

Input consists from multiple test cases. The first line of each test case contains single non negative integer n less than 10000. Following n lines contains 4 integers xi , yi , zi , ri which indicates x,y,z coordinates and radius of ith-balloon. xi , yi , zi , ri sholud be less than 10,000 in absolute value. The next line contains single positive integer m less than 100. Following m lines contains 3 integers. These integers indicate xyz-coordinates of the place which can be shot with a target. These integers should be less than 10,000 in absolute value. Input is terminated by EOF.

You can assume that there is no balloon which touches the origin or the target place.

输出格式

For each test case, you are to print “Case X:” where X is the number of the test case starting with 1 for the first test case and incrementing by 1 for successive test case. For each place, you should output “Yes” if you can shoot there, otherwise output “No”. You should output a blank line between two test cases.

样例

Input
1
2 0 0 1
2
4 0 0
0 1 0
Output
Case 1:
No
Yes

1 人解决,11 人已尝试。

1 份提交通过,共有 77 份提交。

9.9 EMB 奖励。

创建: 15 年,4 月前.

修改: 6 年,8 月前.

最后提交: 6 年,3 月前.

来源: ECNU 选拔 2008

题目标签