Logo
(追記) (追記ここまで)

4296번 - Great Circle 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB70111020.833%

문제

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.

제한

예제 입력 1

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

예제 출력 1

75,41N
90,0N
undefined

힌트

출처

Contest > Waterloo's local Programming Contests > 5 February, 2005 A번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /