题目描述
Problem Background
Li Bin has a convex polygon (for those who don't know what a convex polygon is, you can look it up on Baidu Encyclopedia) P.
Problem Description
P has n vertices p1, p2, p3, ..., pn. The coordinates of vertex pi in a 2D plane are (xi, yi). These vertices are given in clockwise order.
Li Bin can specify a real number D, then move each vertex by at most D units. Now, Li Bin wants to know the minimum value of D such that the convex polygon is no longer convex.
Input Format
The first line contains a single integer n.
The next n lines each contain two integers, representing the coordinates xi and yi of a vertex. The vertices are guaranteed to be given in clockwise order and form a strictly convex polygon.
Output Format
Output a real number D, which is the minimum value that makes the convex polygon no longer convex.
Let your answer be a, and the standard answer be b. You are correct if a and b satisfy $\frac{|a-b|}{\max(1, b)} \le 10^{-4}$.
Sample Input and Output
Sample Input #1
4
0 0
0 1
1 1
1 0
Sample Output #1
0.3535533906
Sample Input #2
6
5 0
10 0
12 -4
10 -8
5 -8
3 -4
Sample Output #2
1.0000000000
Notes
For 100% of the data, 4 <= n <= 1000, -10^9 <= xi, yi <= 10^9.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分