1772.
CSGO0
时间限制 20000 ms
内存限制 64 MB
Senior Pan is crazy about CSGO and she is so skilled. She can kill every enemy she spots at the same time, even if they are in different positions.
There are some walls in a map. The locations of enemies are represented by some points and walls are represented by some line segments in the XY plane. The position of senior Pan is also described as a point. Senior Pan can spot an enemy if and only if the segment between them doesn't intersect with any wall segment. But if there are other enemies on this segment, she can kill all of them.
For some given positions, senior Pan wants to know how many enemies she can kill in these positions. Your Task is to write a program to figure it out.
输入数据
输出数据
For each test case, output "Case #x: " in the first line (without quotes).
For next Q lines, each line output a number which represents the number of enemies senior Pan can kill in her i-th chosen location.
样例输入
复制
3 2 1
1 1
2 2
-1 1
0 1 -1 0
2 -2 2 0
0 0
5 4 2
29 -8
19 33
-46 -44
-38 19
9 -20
40 45 38 18
9 -32 -8 46
33 20 35 -19
22 17 -5 40
19 -38
-17 -21
· · \n
· \n
· \n
· \n
· · · \n
· · · \n
· \n
· · \n
· \n
· \n
· \n
· \n
· \n
· · · \n
· · · \n
· · · \n
· · · \n
· \n
· \n
样例输出
复制
Case #1:
2
Case #2:
3
2
· \n
\n
· \n
\n
\n