| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 10 | 0 | 0 | 0.000% |
Svetozar is passionate about robotics. He loves to test his robots on a flat, perfectly round platform in his backyard. Today, he invited $n$ of his friends and positioned each of them at the edge of this platform (that is, on the circumference), each at different points.
Svetozar is now planning to position his new robot at some good point on the platform, and then command it to determine the $k$-th closest friend to the robot (if there are several, choose any) and walk straight to that friend. Svetozar calls a point on the platform good if there is no half-plane containing all his friends, the boundary of which passes through the given point.
Now Svetozar is interested in the expected distance the robot will travel if its initial point is equally likely to be chosen from all good points.
The first line contains two integers $n$ and $k$ (3ドル \leq n \leq 100,ドル 1ドル \leq k \leq n$): the number of Svetozar's friends involved, and the parameter for the robot.
The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ (0ドル \leq a_i < 360 \cdot 10^3,ドル $a_i \ne a_j$ for $i \ne j$). Here, $a_i$ denotes the angle between the direction to the north and the direction from the center of the platform to Svetozar's $i$-th friend counterclockwise, in thousandths of a degree.
Print a single real number: the expected distance, measured in radii of platform. The answer will be considered correct if its absolute or relative error does not exceed 10ドル^{-4}$.
3 1 2023 122023 242023
0.607986406
3 2 122023 242023 2023
1.174556945
3 3 242023 2023 122023
1.376646683
9 9 8 24 43 539 982 4435 39982 44353 99824
1.046471608
3 1 998 244 353
0.002476278