Problem:
Score : 600 points

Problem Statement

Given are N points (x_i, y_i) in a two-dimensional plane.

Find the minimum radius of a circle such that all the points are inside or on it.

Constraints

2 \leq N \leq 50

0 \leq x_i \leq 1000

0 \leq y_i \leq 1000

The given N points are all different.

The values in input are all integers.

Input

Input is given from Standard Input in the following format:

N
x_1 y_1
:
x_N y_N

Output

Print the minimum radius of a circle such that all the N points are inside or on it.

Your output will be considered correct if the absolute or relative error from our answer is at most 10^{-6}.

Sample Input 1

2
0 0
1 0

Sample Output 1

0.500000000000000000

Both points are contained in the circle centered at (0.5,0) with a radius of 0.5.

Sample Input 2

3
0 0
0 1
1 0

Sample Output 2

0.707106781186497524

Sample Input 3

10
10 9
5 9
2 0
0 0
2 7
3 3
2 5
10 0
3 7
1 9

Sample Output 3

6.726812023536805158

If the absolute or relative error from our answer is at most 10^{-6}, the output will be considered correct.

Solution in Python (3.4.3) (judge verdict: Wrong Answer)

n = int(input())
points = []
INF = 1e100
ans = INF

def dist(p1, p2):
    (x1, y1) = p1
    (x2, y2) = p2
    return  ((x1 - x2) ** 2 + (y1- y2) ** 2) ** 0.5
            

for i in range(n):
    x, y = map(int, input().split())
    points.append((x,y))

def cos_of(p1, p2, p3):
    (x1, y1) = p1
    (x2, y2) = p2
    (x3, y3) = p3
    dot = (x2 - x1) * (x3 - x1) + (y2- y1) * (y3 - y1)
    dot /= dist(p1, p2) * dist(p1, p3)
    return dot
    
def sin_of(p1, p2, p3):
    (x1, y1) = p1
    (x2, y2) = p2
    (x3, y3) = p3    
    area = abs((x2-x1) * (y3 - y1) - (y2 - y1) * (x3 - x1))
    return area / dist((x1,y1),(x2,y2)) / dist((x1,y1), (x3,y3))

def ccw(p1, p2, p3):
    return sin_of(p1, p2, p3) > 0

def is_inside(p1, p2, p3, p4):
    if p1 == p4 or p2 == p4 or p3 == p4:return True
    if sin_of(p1, p2, p4) == 0:
        return cos_of(p4, p1, p2) < 0
    if ccw(p1, p2, p3) == ccw(p1, p2, p4):
        cos3 = cos_of(p3, p1, p2)
        cos4 = cos_of(p4, p1, p2)
        return cos3 >= cos4
    else:
        cos3 = -cos_of(p3, p1, p2)
        cos4 = cos_of(p4, p1, p2)
        return cos3 >= cos4

def three(p1, p2, p3):
    sina = sin_of(p1, p2, p3)
    r = dist(p2, p3) / sina / 2
    for i in range(n):
        if not is_inside(p1, p2, p3, points[i]):
            return INF
    return r
    

for i in range(n):
    for j in range(i+1, n):
        for k in range(j+1, n):
            if(sin_of(points[i], points[j], points[k]) == 0):continue
            ans = min(ans, three(points[i], points[j], points[k]))

def two(p1, p2):
    (x1, y1) = p1
    (x2, y2) = p2

    r = dist((x1,y1), (x2,y2)) / 2
    cx = (x1 + x2) / 2
    cy = (y1 + y2) / 2
    for i in range(n):
        if(dist((cx,cy), points[i]) > r):
            return INF
    return r
        
            
for i in range(n):
    for j in range(i+1, n):
        ans = min(ans, two(points[i], points[j]))

print(ans)