Pro.ID22384 TitleGreat Circle Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22384 AC0 Submit0 Ratio- 时间&空间限制描述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).] 输出Description 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. Input 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).] Output 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. Sample Input 3 Sample Output 75,41N Source 样例输入3 样例输出75,41N 作者 |