301456: CF274C. The Last Hole!
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
The Last Hole!
题意翻译
给出平面上 n 个圆的圆心坐标,最开始它们的半径都是 0,然后所有圆同时开始扩大,在时刻 t 时所有圆的半径均为 t。 假设这些黑色的圆被放在一个无穷大的白色平面上,每个时刻都存在一些黑色、白色连通块。随着圆的逐渐增大,越来越多的圆会相交。 定义一个白色的封闭区域为一个“洞”,求最后一个“洞”消失的时刻。如果没有“洞”则输出-1。 答案精度差不能超过10^(-4)题目描述
Luyi has $ n $ circles on the plane. The $ i $ -th circle is centered at $ (x_{i},y_{i}) $ . At the time zero circles start to grow simultaneously. In other words, the radius of each circle at time $ t\ (t>0) $ is equal to $ t $ . The circles are drawn as black discs on an infinite white plane. So at each moment the plane consists of several black and white regions. Note that the circles may overlap while growing. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF274C/9b4e1ebb881bb05cb98067ff4ad19ee2f6db6140.png)We define a hole as a closed, connected white region. For instance, the figure contains two holes shown by red border. During growing some holes may be created and it is easy to see that each created hole will disappear eventually. Luyi asks you to find moment of time such that the last hole disappears. In other words, you should find the first moment such that no hole can be seen after that.输入输出格式
输入格式
The first line of the input contains integer $ n $ ( $ 1<=n<=100 $ ). Each of the next $ n $ lines contains two integers $ x_{i} $ and $ y_{i} $ ( $ -10^{4}<=x_{i},y_{i}<=10^{4} $ ), indicating the location of $ i $ -th circle. It's guaranteed that no two circles are centered at the same point.
输出格式
Print the moment where the last hole disappears. If there exists no moment in which we can find holes print -1. The answer will be considered correct if the absolute or relative error does not exceed $ 10^{-4} $ .
输入输出样例
输入样例 #1
3
0 0
1 1
2 2
输出样例 #1
-1
输入样例 #2
4
0 0
0 2
2 2
2 0
输出样例 #2
1.414214
输入样例 #3
4
0 1
0 -1
-2 0
4 0
输出样例 #3
2.125000