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 (Python):
n = int(input())
info = [list(map(int, input().split())) for i in range(n)]

import math, random










def make_circle(points):
    
    shuffled = [(float(p[0]), float(p[1])) for p in points]
    random.shuffle(shuffled)

    
    c = None
    for (i, p) in enumerate(shuffled):
        if c is None or not _is_in_circle(c, p):
            c = _make_circle_one_point(shuffled[0 : i + 1], p)
    return c



def _make_circle_one_point(points, p):
    c = (p[0], p[1], 0.0)
    for (i, q) in enumerate(points):
        if not _is_in_circle(c, q):
            if c[2] == 0.0:
                c = _make_diameter(p, q)
            else:
                c = _make_circle_two_points(points[0 : i + 1], p, q)
    return c



def _make_circle_two_points(points, p, q):
    diameter = _make_diameter(p, q)
    if all(_is_in_circle(diameter, r) for r in points):
        return diameter

    left = None
    right = None
    for r in points:
        cross = _cross_product(p[0], p[1], q[0], q[1], r[0], r[1])
        c = _make_circumcircle(p, q, r)
        if c is None:
            continue
        elif cross > 0.0 and (left is None or _cross_product(p[0], p[1], q[0], q[1], c[0], c[1]) > _cross_product(p[0], p[1], q[0], q[1], left[0], left[1])):
            left = c
        elif cross < 0.0 and (right is None or _cross_product(p[0], p[1], q[0], q[1], c[0], c[1]) < _cross_product(p[0], p[1], q[0], q[1], right[0], right[1])):
            right = c
    return left if (right is None or (left is not None and left[2] <= right[2])) else right


def _make_circumcircle(p0, p1, p2):
    
    ax = p0[0]; ay = p0[1]
    bx = p1[0]; by = p1[1]
    cx = p2[0]; cy = p2[1]
    d = (ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)) * 2.0
    if d == 0.0:
        return None
    x = ((ax * ax + ay * ay) * (by - cy) + (bx * bx + by * by) * (cy - ay) + (cx * cx + cy * cy) * (ay - by)) / d
    y = ((ax * ax + ay * ay) * (cx - bx) + (bx * bx + by * by) * (ax - cx) + (cx * cx + cy * cy) * (bx - ax)) / d
    return (x, y, math.hypot(x - ax, y - ay))


def _make_diameter(p0, p1):
    return ((p0[0] + p1[0]) / 2.0, (p0[1] + p1[1]) / 2.0, math.hypot(p0[0] - p1[0], p0[1] - p1[1]) / 2.0)


_EPSILON = 1e-12

def _is_in_circle(c, p):
    return c is not None and math.hypot(p[0] - c[0], p[1] - c[1]) < c[2] + _EPSILON



def _cross_product(x0, y0, x1, y1, x2, y2):
    return (x1 - x0) * (y2 - y0) - (y1 - y0) * (x2 - x0)
  
print(make_circle(info)[-1])

Solution (Python):






from sys import stdin, stdout, setrecursionlimit

input = stdin.readline
flush = stdout.flush





OUT = []


def write(item, sep=""):
    if type(item) is int or type(item) is long:
        OUT.append(str(item))
    elif type(item) is float:
        OUT.append("%.9f" % item)
    elif type(item) is list or type(item) is tuple:
        if len(item) == 0:
            OUT.append(" ")
        elif type(item[0]) is int:
            OUT.append(sep.join(map(str, item)))
        else:
            OUT.append(sep.join(item))
    else:
        OUT.append(item)


def PRINT(sep="\n"):
    print(sep.join(OUT))


GI = lambda: int(input())
GS = lambda: input().rstrip()

gi = lambda: list(map(int, input().split()))
gs = lambda: input().split()

digits = lambda i: list(map(int, str(i)))



n = GI()
pts = [gi() for i in range(n)]
while len(pts) < 3:
    pts.append(pts[-1])
    n+=1
def getDist(x,y,z):
    xa,ya = pts[x]
    xb,yb = pts[y]
    xc,yc = pts[z]

    a = pow((xb - xc)**2 + (yb - yc)**2, 0.5)
    b = pow((xa - xc)**2 + (ya - yc)**2, 0.5)
    c = pow((xb - xa)**2 + (yb - ya)**2, 0.5)
    s = (a + b + c) / 2.0
    a,b,c = sorted([a,b,c])
    if s == 0 or a*a + b*b - c*c <= 0:
        return c / 2.0
    return a*b*c / 4.0 / pow(s*(s-a)*(s-b)*(s-c), 0.5)



m = -1
for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            m = max(m, getDist(i, j, k))
print "%.7f" % m

Solution (Python):
import math
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n = ni()
co = []
for i in range(n):
    co.append(na())


def circumcircle(ax, ay, bx, by, cx, cy):
    if (bx-ax)*(cy-ay)-(by-ay)*(cx-ax) == 0:
        return None
    D = 2 * (ax * (by - cy) + bx * (cy - ay) + cx * (ay - by))
    X = ((ax * ax + ay * ay) * (by - cy) + (bx * bx + by * by) * (cy - ay) + (cx * cx + cy * cy) * (ay - by)) / D
    Y = ((ax * ax + ay * ay) * (cx - bx) + (bx * bx + by * by) * (ax - cx) + (cx * cx + cy * cy) * (bx - ax)) / D;
    R = math.sqrt((X - ax) * (X - ax) + (Y - ay) * (Y - ay))
    return X, Y, R


minr = 999999999999999
for i in range(n):
    for j in range(i+1, n):
        for k in range(j+1, n):
            cc = circumcircle(co[i][0], co[i][1], co[j][0],co[j][1], co[k][0], co[k][1])
            if cc:
                x, y, r = cc
                if r > minr:
                    continue
                ok = True
                for u in co:
                    if (u[0]-x) * (u[0]-x) + (u[1]-y)*(u[1]-y) > r*r + 1e-9:
                        ok = False
                        break
                if ok:
                    minr = r

for i in range(n):
    for j in range(i+1, n):
        x, y, r = (co[i][0] + co[j][0])/2, (co[i][1]+co[j][1])/2, \
            math.sqrt((co[i][0]-co[j][0])*(co[i][0]-co[j][0]) +\
                      (co[i][1] - co[j][1]) * (co[i][1] - co[j][1])
                      )/2
        if r > minr:
            continue
        ok = True
        for u in co:
            if (u[0]-x) * (u[0]-x) + (u[1]-y)*(u[1]-y) > r*r + 1e-9:
                ok = False
                break
        if ok:
            minr = r

print("{:.14f}".format(minr))