CF274C.The Last Hole!

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Luyi has nn circles on the plane. The ii -th circle is centered at (xi,yi)(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 tt . 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.

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 nn ( 1<=n<=1001<=n<=100 ). Each of the next nn lines contains two integers xix_{i} and yiy_{i} ( 104<=xi,yi<=104-10^{4}<=x_{i},y_{i}<=10^{4} ), indicating the location of ii -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 10410^{-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
    
首页