This page is still under construction.

Parts of this page are still being built. What you see may change.

Panda Preserve

Time limit10sMemory limit1024 MB

Summary
Given a simple polygon and receivers at its vertices with a common radius, find the smallest radius whose union of disks covers the whole polygon.
Level

Hard8 of 10

Topics
Geometry, Binary search, Brute force, Implementation
Solved
No attempts yet

Problem

Sichuan province set aside land for a national park, a preserve for a population of more than 1800 giant pandas. A polygonal fence runs along the border of the park. To track the pandas, the researchers put one wireless receiver at every vertex of that polygon and fit every animal with a transmitter. A receiver covers a disk centered at its own position, and all receivers have the same range. A receiver with a shorter range costs less, so find the shortest range that still covers the whole park.

The figure below shows the park of the first example. A range of 35 leaves part of the park uncovered (a). A range of 50 covers all of it (b).

Input

The first line contains an integer nn (3≤n≤20003 \le n \le 2000), the number of vertices of the polygon that bounds the park. Each of the next nn lines contains two integers xx and yy (∣x∣,∣y∣≤104|x|, |y| \le 10^4), the coordinates of one vertex. The vertices are given in counter-clockwise order.

The polygon is simple. Its vertices are distinct, and no two edges intersect or touch, except that consecutive edges touch at their shared vertex.

Output

Print the shortest range that covers the whole park, with exactly six digits after the decimal point.

Examples3

  1. Example 1

    Input
    5
    0 0
    170 0
    140 30
    60 30
    0 70
    
    Expected output
    50.000000
    
  2. Example 2

    Input
    5
    0 0
    170 0
    140 30
    60 30
    0 100
    
    Expected output
    51.538820
    
  3. Example 3

    Input
    5
    0 0
    1 2
    1 5
    0 2
    0 1
    
    Expected output
    1.581139