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

19462번 - Immigration 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB44141340.625%

문제

Peter the Pig is riding a tractor, starting at the origin at moment 0ドル$ and moving along the $x$-axis with speed $u$. Since the road is infinite and not interesting enough, Peter is looking for entertainment. At moment $t_0$ he notices some object at point $(x_0, y_0)$ moving with velocity $v_0 = (v_{0x}, v_{0y})$. So, Peter starts to rotate his head always keeping his eyes fixed at the object. From time to time ($n$ times in total), the object changes its velocity. Namely, at moment $t_i$ the object instantly changes its velocity to $v_i = (v_{ix}, v_{iy})$ for $i = 1, 2, \ldots, n$. It is guaranteed that the object never collides with Peter.

Define $f(t)$ as the directed angle (measured in radians) between $x$-axis and the direction from Peter to the object at moment $t$. We allow $f(t)$ to differ from the actual angle by a multiple of 2ドル \pi$ as long as the function $f(t)$ is continuous. Define the angular speed of Peter's head as the derivative $f'(t)$. You need to find the maximum of $|f'(t)|$ from the moment $t_0$ to the infinity. In other words, you need to find the maximum of the absolute value of angular speed. It is guaranteed that the answer is finite.

입력

The first line contains four integers $u,ドル $x_0,ドル $y_0,ドル $n$ (1ドル \le u \le 100,ドル $|x_0|, |y_0| \le 10^8,ドル 0ドル \le n \le 10^5$) --- the speed of Peter's tractor, the coordinates of the object when first observed by Peter, and the number of times the object changes its velocity.

Each of the next $(n + 1)$ lines contains three space-separated integers $t_i,ドル $v_{ix},ドル $v_{iy}$ (0ドル \le t_i \le 10^6,ドル $|v_{ix}|, |v_{iy}| \le 100$). It is guaranteed that $t_0 < t_1 < \ldots < t_n$. Note that it is possible that $(v_{ix}, v_{iy}) = (0, 0)$. Also note that movement of the object after moment $t_n$ is infinite.

출력

In the only line print one real number with absolute or relative error not exceeding 10ドル^{-6}$ --- the maximum absolute value of the angular speed of Peter's head during his observation of the object.

제한

예제 입력 1

1 0 -2 0
0 1 0

예제 출력 1

0.0000000000

예제 입력 2

2 0 -2 0
0 3 1

예제 출력 2

1.0000000000

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2016 > Day 3: Moscow IPT Contest I번

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

출처

대학교 대회

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

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