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 PyPy3 (2.4.0) (judge verdict: Wrong Answer)

#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10

#solve
def solve():
    def fx(z):
        for xi, yi in xy:
            x = A - xi
            y = B - yi
            if x ** 2 + y ** 2 > z ** 2:
                return False
        return True
    n = II()
    x = 0
    y = 0
    xy = LIR(n)
    ans = inf
    for i in range(n):
        for j in range(i):
            x1, y1 = xy[i]
            x2, y2 = xy[j]
            x = (x2 + x1) / 2
            y = (y2 + y1) / 2
            r = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) / 2
            for k in range(n):
                x3, y3 = xy[k]
                if (x3 - x) ** 2 + (y3 - y) ** 2 > r ** 2:
                    break
            else:
                ans = min(ans, r)
    # print(ans)
    full = itertools.combinations(range(n), 3)
    for f in full:
        a, b, c = f
        # print(a,b,c)
        axy = xy[a]
        x1, y1 = axy
        bxy = xy[b]
        x2, y2 = bxy
        cxy = xy[c]
        x3, y3 = cxy
        a = x1 - x2
        b = y1 - y2
        c = x2 - x3
        d = y2 - y3
        try:
            A = (d * (x1 ** 2 + y1 ** 2 - x2 ** 2 - y2 ** 2) - b * (x2 ** 2 + y2 ** 2 - x3 ** 2 - y3 ** 2)) / (2 * (a * d - b * c))
            B = (-c * (x1 ** 2 + y1 ** 2 - x2 ** 2 - y2 ** 2) + a * (x2 ** 2 + y2 ** 2 - x3 ** 2 - y3 ** 2)) / (2 * (a * d - b * c))
            r = sqrt((x1 - A) ** 2 + (y1 - B) ** 2)
            for x,y in xy:
                if (x - A) ** 2 + (y - B) ** 2 > r ** 2:
                    break
            else:
                ans = min(ans, r)
        except:
            continue
    
    print(ans)
    return


#main
if __name__ == '__main__':
    solve()