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

建议使用的浏览器:

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

2298:Great Circle

题目描述
Airplanes fly close to the Great Circle Route between two cities. The Great Circle Route is the shortest arc concentric with the earth that joins the two cities; that is, the shortest distance between the two cities following the surface of the earth.
Given the latitude and longitude of two cities, find the most northerly latitude reached on the Great Circle Route between the cities. Print "undefined" if there is no unique answer.
输入解释
The first line of input contains N, the number of test cases. N lines follow, one for each case, containing the latitude and longitude of the two cities, in degrees, minutes, and direction. [A minute is 1/60 degree; Points on the equator have latitude denoted 0,0N (not 0,0S); points on the poles have longitude denoted 0,0W; points with 180 degrees longitude are denoted 180,0W (not 180,0E).]
输出解释
For each case your program should produce one line of output giving the most northerly latitude reached, in the given format. Round your answer to the nearest minute.
输入样例
3
50,13N 45,10W 75,0N 44,50E
50,13N 90,10W 75,0N 89,50E
10,0N 129,30E 10,0S 50,30W
输出样例
75,41N
90,0N
undefined

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

源链接: POJ-2298

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

共提交 0

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