问题2092--Global Roaming

2092: Global Roaming

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 64 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.

样例输入 Copy

<pre>
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
</pre>

样例输出 Copy

Test case 1:
Ulm
Honolulu

Test case 2:
Ulm

来源/分类

Ulm Local 2001