Problem C
Hard Evidence
Consider taking a photo of the base from some point $P$ outside the fence. Let $Q$ be the left-most point of the base when viewed from $P$, and let $R$ be the right-most point of the base when viewed from $P$. Then the view angle of the base at $P$ is the angle at $P$ in the triangle formed by the three points $P$, $Q$ and $R$.
The detail level of the photo depends on the view angle of the base at the point from which the photo is taken. Therefore he wants to find a point to maximize this angle.
Input
The first line of the input file contains two integer numbers: $n$ and $r$ — the number of vertices of the polygon and the radius of the fence ($3 \le n \le 200$, $1 \le r \le 1000$ ). The following $n$ lines contain two real numbers each — the coordinates of the vertices of the polygon listed in counterclockwise order. It is guaranteed that all vertices of the polygon are strictly inside the fence circle, and that the polygon is convex. The center of the fence circle is located at the origin, $(0, 0)$.
Output
Output the maximal view angle $a$ for the photo ($0 \le a < 2 \pi $). Any answer with either absolute or relative error smaller than $10^{-6}$ is acceptable.
Sample Input 1 | Sample Output 1 |
---|---|
4 2 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 |
1.5707963268 |