#P2333. [SCOI2006] 一孔之见

[SCOI2006] 一孔之见

Description

Looking at a convex polygon through a circular hole, to make the visible area at least SS, what is the minimal required radius of the hole?
Assume the hole's center is fixed at (0,0)(0,0), and (0,0)(0,0) lies strictly inside the polygon (not outside or on its boundary).

Input Format

The first line contains an integer nn and a real number SS (with two decimal places), representing the number of vertices of the convex polygon and the area that must be visible. It is guaranteed that SS does not exceed the area of the convex polygon.

Each of the following nn lines contains two real numbers x,yx, y (with six decimal places), representing the coordinates of each vertex. The vertices are given in either counterclockwise or clockwise order.

Output Format

Output a real number rr, with two decimal places, representing the minimal radius of the hole.

3 1.60
-1 -1
1 -1
0 1

0.93

Hint

Constraints:

  • For 50%50\% of the testdata: 3n103 \le n \le 10, the input convex polygon is regular, and its center is at (0,0)(0,0).
  • For 100%100\% of the testdata: 3n503 \le n \le 50.

Translated by ChatGPT 5