题目描述
Problem Description
Due to your outstanding performance, the alien invasion has been successfully neutralized. Now, JYY has assembled a powerful Golden Fleet, ready to deliver a decisive blow to the alien mothership.
The Golden Fleet consists of $n(n\ge 3)$ spaceships, which can concentrate their energy at a single point (the location of the alien mothership) to deliver a devastating strike. JYY plans to simultaneously teleport all spaceships near the mothership and launch an immediate attack to end the battle.
Upon arrival, due to various unstable factors, the spaceships in the fleet are not in their optimal attack positions. Therefore, they need to be quickly adjusted. Currently, all spaceships have completed their teleportation, and each can be considered as a point in a plane. The coordinates of the $i(1\le i\le n)$th spaceship are $(x_i, y_i)$. The alien mothership is located at the origin $(0,0)$.
To achieve the most efficient strike, all spaceships must move to the attack orbit. The attack orbit is a circle centered at the origin $(0,0)$ with a radius of $R$. Due to the immense energy generated by the launch, JYY wants the spaceships to be as far apart from each other as possible. Specifically, JYY wants all $n$ spaceships to be evenly distributed on the attack orbit (all spaceships are of the same model, so they can be arranged in any order), meaning the distance between adjacent spaceships on the attack orbit (arc) is equal and exactly $\frac{2\pi R}{n}$. In other words, JYY wants to adjust the positions of all spaceships so that they are on the attack orbit and precisely at the $n$ vertices of a regular $n$-sided polygon.
Please help JYY calculate the shortest time to initiate the strike (i.e., the minimum time for all spaceships to move to the attack orbit and be equidistantly arranged). Spaceships can move one unit of distance per unit of time in the plane, and the volume of the spaceships can be considered as zero. Therefore, it is allowed for spaceships to "meet" at a certain moment in your proposed plan. Additionally, the initial coordinates of the spaceships may also overlap.
Input Format
The first line of input contains two integers $n, R$, representing the number of spaceships and the radius of the attack orbit, respectively.
The next $n$ lines each contain two integers $(x_i, y_i)$, representing the coordinates of each spaceship.
Output Format
Output a single line, representing the shortest time for all spaceships to be in position (please retain enough decimal places). If your output is within $10^{-6}$ of the reference answer, it is considered correct.
Sample Input and Output
Sample Input #1
3 1
0 0
0 0
0 0
Sample Output #1
1.00000000
Sample Input #2
3 10
10 0
0 10
10 10
Sample Output #2
12.17522858
Notes
For $20\%$ of the data, $n=3$.
For $50\%$ of the data, $n\le 50$.
For $100\%$ of the data, $3 \le n\le 200, 0 \le \vert x_i \vert, \vert y_i \vert, R \le 100$.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分