21438_GlobalRoaming

2022-5-16 18:19| 发布者: Hocassian| 查看: 35| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505263820600-Problem List-采集的数据-后羿采集器.html

Pro.ID

21438

Title

Global Roaming

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21438

AC

13

Submit

45

Ratio

28.89%

时间&空间限制

  • Time Limit: 1000/500 MS (Java/Others)     Memory Limit: 32768/32768 K (Java/Others)
  • 描述

    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.

    输出

    Description

    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.

    Input

    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.

    Output

    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.

    Sample 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
    Sample Output
    Test case 1:
    Ulm
    Honolulu

    Test case 2:
    Ulm
    Source

    样例输入

    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

    样例输出

    Test case 1:
    Ulm
    Honolulu

    Test case 2:
    Ulm

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部