| Ural Championship 2014 |
|---|
| Finished |
Dima has several brothers and one pizza. The pizza is a circle with a radius of $$$1$$$. Dima wants to share the pizza fairly, ensuring that:
On the circumference of the pizza, there are $$$N$$$ olives positioned at different angles. The task is to cut the pizza into exactly $$$K$$$ slices using $$$K - 1$$$ straight cuts. Each cut must pass through two olives, and every cut, except for the first, must start where the previous cut ended.
The first line contains two integers $$$N$$$ and $$$K$$$ ($$$2 \leq N \leq 30$$$, $$$2 \leq K \leq N$$$) — the number of olives and the number of slices the pizza needs to be cut into. The second line contains $$$N$$$ distinct integers $$$P_i$$$ ($$$0 \leq P_i \leq 359$$$) — the polar angles in degrees that define the positions of the $$$i$$$-th olive. All $$$P_i$$$ are unique and sorted in ascending order. The center of the polar coordinate system is the center of the pizza.
Output the area of the smallest slice of pizza when optimally cut. The answer must have an absolute or relative error not exceeding $$$10^{-5}$$$.
3 2 0 60 270
1.05899694
4 4 85 90 265 270
0.08721110
| Name |
|---|


