atcoder#ABC181F. [ABC181F] Silver Woods
[ABC181F] Silver Woods
Score : points
Problem Statement
On the -plane, we have a passage surrounded by the two lines and .
In the part of this passage with , there are negligibly small nails. The coordinates of the -th nail are .
Takahashi will choose a real number and put a circle of radius so that its center is at .
Then, he will move the circle from to .
Here, he continuously moves the circle so that the boundaries of the passage or the nails do not penetrate the interior of the circle.
Find the maximum possible value of such that it is possible to move the circle to .
Constraints
- All values in input are integers.
- If , .
Input
Input is given from Standard Input in the following format:
Output
Print the maximum possible value of such that it is possible to move the circle to . Your output will be considered correct when its absolute or relative error from our answer is at most .
2
0 -40
0 40
40
As shown in the figure, we can move the circle with from to by moving it along .
When , the circle exactly touches the two nails, which is fine since they do not penetrate the interior of the circle.
Any value of greater than makes it impossible to move the circle to , so the maximum possible value is .
4
0 -10
99 10
0 91
99 -91
50.5
10
-90 40
20 -30
0 -90
10 -70
80 70
-90 30
-20 -80
10 90
50 30
60 -70
33.541019662496845446
10
65 -90
-34 -2
62 99
42 -13
47 -84
84 87
16 -78
56 35
90 8
90 19
35.003571246374276203