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

23602번 - Drone With a Camera 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 256 MB146171320.635%

문제

Maggy got a camera-equipped drone as a present. She wants to take photos of two nearby straight infinite roads using a drone and best road photos are taken directly above the road. She would like to make drone's route as short as possible, as she is afraid that the batteries might not last long enough. Of course, the drone must start and finish at Maggy's house! Help her to plan the shortest possible route.

입력

The first line of the input contains three integers $a, b, c$ ($-10^6 \leq a,b,c \leq 10^6,ドル $a \neq 0$ or $b \neq 0$), each separated by a single space They describe the first road, which satisfies the equation $a x + b y = c$. The second and last line of the input contains a similar description of the second road.

The two roads are different, i.e. they do not coincide. Furthermore, they do not pass through Maggys' house, whose coordinates are $(0,0)$.

출력

You should write a single real number in the first and only line of the output -- the smallest possible length of drone's route. The answer is accepted, if its relative or absolute error is at most 10ドル^{-6}$.

제한

예제 입력 1

1 0 2
-1 1 1

예제 출력 1

5.099019513593

힌트

출처

Contest > Open Cup > 2018/2019 Season > Stage 6: Grand Prix of Poland A번

ICPC > Regionals > Europe > Central European Regional Contest > Poland Collegiate Programming Contest > AMPPZ 2018 A번

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

출처

대학교 대회

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

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