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

15002번 - Soccer Skills 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB24111058.824%

문제

At the company soccer tournament, you want to impress your boss, who is watching the game you are participating in. Fortunately, you are a pretty good soccer player, who can make some sharp passes. You look around you to your team mates to see if there are any around who are close enough that you can reliably pass, but far away enough that your boss will be impressed.

입력

  • A line with an integer 1 ≤ N ≤ 106, the number of team mates on the field.
  • A line with two floating point numbers 0 ≤ a, b ≤ 1000. The number a gives the least distance at which your boss will be impressed, and the number b gives the largest distance at which you can reliably pass.
  • A line with two integers −1000 ≤ px, py ≤ 1000, your position on the playing field.
  • N lines, each with two integers −1000 ≤ qx, qy ≤ 1000, the positions of your team mates on the field.

출력

  • If there is no team mate on the field you can pass to in such a way that you will impress your boss, output a single line with the word “impossible”.
  • Otherwise, output a single line with two integers qx, qy, the location of a team mate you can pass to, and two floating point numbers: the distance from you to that team mate, and the angle at which you have to shoot, given as an angle in [−π, π) measured counter-clockwise from the positive x-axis.

The distance and angle will be accepted if the absolute or relative difference is at most 10−6 from the actual value.

제한

예제 입력 1

2
1.0 2.0
0 0
1 1
2 2

예제 출력 1

1 1 1.41421356 0.78539816

예제 입력 2

2
1.0 2.0
0 0
2 2
4 4

예제 출력 2

impossible

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2017 Preliminaries Z번

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

출처

대학교 대회

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

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