当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3407:Brookebond s'en va en guerre...

Special Judge 特殊评判
题目描述

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 lines 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.

输出解释

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.

输入样例
55 0 N 40 0 E
59 0 N 49 30 E
输出样例
725.979

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3407

最后修改于 2020-10-29T07:00:52+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536