22679_Brookebonds’envaenguerre…

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

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

Pro.ID

22679

Title

Brookebond s’en va en guerre…

Title链接

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

AC

0

Submit

1

Ratio

0.00%

时间&空间限制

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

    Famous military leader marshal Brookebond who has never lost a battle (truth to be told, he has never won one either) is sincerely convinced that all military operations can be planned on the globe. Let's not reveal the depth of his misconceptions to the poor marshal. Instead, let's help him by writing a program to compute the distance between two points on the surface of the Earth given in the geographic coordinates. An order from the marshal Brookebond declares the Earth to be a perfect sphere having radius of 6370 kilometers. And the orders, as we all know, are not to be discussed…

    Geographic latitude and longitude are measured in degrees and minutes with the accuracy to one minute (one degree containing 60 minutes, of course). The latitude is measured from 90 degrees of northern latitude (N) for the North Pole to 90 degrees of southern latitude (S) for the South Pole; the latitude of any point on the equator is 0 degrees (N or S, does not matter). The longitude of is measured from 180 degrees of eastern longitude (E) to 180 degrees of western longitude (W); for point on meridians with longitude 180 or 0, E and W are equivalent.

    输入

    The first and second line of the input contain the coordinates (latitude and longitude) of one point each. The designation of a latitude contains two integers (degrees and minutes) and a letter N or S. Similarly, the designation of a longitude contains two integers (degrees and minutes) and a letter E or W. Adjacent values on a line are separated by one or more spaces.

    输出

    Description

    Famous military leader marshal Brookebond who has never lost a battle (truth to be told, he has never won one either) is sincerely convinced that all military operations can be planned on the globe. Let's not reveal the depth of his misconceptions to the poor marshal. Instead, let's help him by writing a program to compute the distance between two points on the surface of the Earth given in the geographic coordinates. An order from the marshal Brookebond declares the Earth to be a perfect sphere having radius of 6370 kilometers. And the orders, as we all know, are not to be discussed…

    Geographic latitude and longitude are measured in degrees and minutes with the accuracy to one minute (one degree containing 60 minutes, of course). The latitude is measured from 90 degrees of northern latitude (N) for the North Pole to 90 degrees of southern latitude (S) for the South Pole; the latitude of any point on the equator is 0 degrees (N or S, does not matter). The longitude of is measured from 180 degrees of eastern longitude (E) to 180 degrees of western longitude (W); for point on meridians with longitude 180 or 0, E and W are equivalent.

    Input

    The first and second line of the input contain the coordinates (latitude and longitude) of one point each. The designation of a latitude contains two integers (degrees and minutes) and a letter N or S. Similarly, the designation of a longitude contains two integers (degrees and minutes) and a letter E or W. Adjacent values on a line are separated by one or more spaces.

    Output

    The first and only line of the output must contain the distance (in kilometers) between the points from the input file with the precision of 1 meter.

    Sample Input

    55 0 N 40 0 E
    59 0 N 49 30 E

    Sample Output

    725.979

    Source

    样例输入

    55 0 N 40 0 E
    59 0 N 49 30 E

    样例输出

    725.979

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部