1423. Global Roaming

单点时限: 2.0 sec

内存限制: 256 MB

A great deal in today’s mobile communication depends on having a direct view to a satellite. For communication providers it is therefore crucial to know where their services are available.

You are to identify locations which have a direct view to a particular satellite, i.e. this satellite must be above the horizon. To make things easier you may assume that the earth is a perfect sphere with a radius of 6378 km (mountains will be added next year…). The satellite is a pointlike object above the earth’s surface.

输入格式

The input file consists of several test cases. For each test case the first line contains the number of locations n to be checked followed by the position of the satellite: its latitude, its longitude (both in degrees) and its height (in km) above the earth’s surface.

Each of the following n lines contains a location on the earth’s surface: the location’s label (a sequence of less than 60 printable ASCII characters containing no whitespace characters) followed by its latitude and longitude (both in degrees).

Input is terminated by n=0.

输出格式

For each test case output the number of the test case as formatted in the sample output. Then, output the locations from where the satellite is visible by printing the corresponding labels on separate lines in the same order as they appear in the input file.

Output a blank line after each test case.

样例

Input
3 20.0 -60.0 150000000.0
Ulm 48.406 10.002
Jakarta -6.13 106.75
Honolulu 21.32 -157.83
2 48.4 10 0.5
Ulm 48.406 10.002
Honolulu 21.32 -157.83
0 0.0 0.0 0.0
Output
Test case 1:
Ulm
Honolulu
Test case 2:
Ulm

3 人解决,3 人已尝试。

4 份提交通过,共有 8 份提交。

7.4 EMB 奖励。

创建: 16 年,9 月前.

修改: 6 年,8 月前.

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

来源: Ulm Local 2001

题目标签