OC once took notice of a game called Reteeee. The core element of this game is spinning, which aroused his curiosity. To simplify, the game can be described as follows:
Assume there exists a rectangular plane coordinate system with the origin at $$$(0, 0)$$$. On this plane, there is a circle of radius $$$r$$$, centered at the origin. Inside the circle, there are $$$n$$$ distinct points $$$(x_i, y_i)$$$. You will have a point $$$P$$$ placed at the origin initially.
At the beginning of the game, the circle starts spinning counterclockwise at a speed of $$$v_1$$$ radians per second, and the points inside the circle spin along with it (around the center of the circle, at the same speed).
At time $$$t$$$, $$$P$$$ starts moving towards the positive X-axis at a speed of $$$v_2$$$ units per second. If vector $$$OP$$$ intersects a point, the point will disappear, and you will get $$$1$$$ point. The game ends as soon as $$$P$$$ intersects the circle.
Your task is to determine the minimum $$$t$$$ to achieve the maximum score.
The first line contains three floating-point numbers $$$r, v_1, v_2$$$ $$$(1 \leq r, v_1, v_2 \leq 2 \times 10^5)$$$, denoting the radius of the circle, and the speed of the circle and $$$P$$$ respectively.
The second line contains one integer $$$n$$$ $$$(1 \leq n \leq 10^5)$$$, denoting the number of points.
For the following $$$n$$$ lines, the $$$i$$$-th line contains two integers $$$x_i, y_i$$$ $$$(0 \lt x_i^2 + y_i^2 \lt r^2)$$$, denoting the $$$i$$$-th point inside the circle.
It's guaranteed that $$$\frac{2 \pi}{v_1} \gt \frac{r}{v_2}$$$, and the points are distinct.
It's also guaranteed that the decimal places of the floating-point numbers do not exceed $$$3$$$.
Output one line containing one floating-point number $$$t$$$, denoting the minimum time for $$$P$$$ to start moving and achieve the maximum score.
Your answer will be accepted if the absolute error between your answer and the standard answer does not exceed $$$10^{-3}$$$.
4 3.141 230 -1-2 00 3
0.000
5 3.141 2.82852 -2-3 -31 11 -4-3 3
0.654
For the first example, $$$t = 0.000$$$. Here, $$$v_1$$$ is treated as $$$\pi$$$ (approximated). Let's simulate this according to the degree the circle has spun:
![]() | ![]() |
| $$$0^{\circ}$$$ | $$$90^{\circ}$$$ |
![]() | ![]() |
| $$$180^{\circ}$$$ | $$$270^{\circ}$$$ |
For the second example, the optimal choice is to start moving when it will finally intersect the $$$4$$$-th point $$$(1, -4)$$$ and the circle at the same time.