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 C++14 (GCC 5.4.1) (judge verdict: Accepted)

#pragma comment(linker, "/STACK:10240000")
#include <bits/stdc++.h>

#define eps 1e-8
#define PI acos(-1.0)

const int M = 110;
using namespace std;
double X,Y;
struct Point
{
    double x,y;
}p[M];
struct Triangle
{
    Point v[3];
};
struct Circle
{
    Point center;
    double r;
};
double pow(double x)
{
    return x*x;
}
double Len(Point a,Point b)
{
    return sqrt(pow(a.x-b.x)+pow(a.y-b.y));
}
double TriangleArea(Triangle a)//求三角形的面积
{
    double px1=a.v[1].x-a.v[0].x;
    double py1=a.v[1].y-a.v[0].y;
    double px2=a.v[2].x-a.v[0].x;
    double py2=a.v[2].y-a.v[0].y;
    return fabs(px1*py2-px2*py1)/2;
}
Circle CircleOfTriangle(Triangle t)//就三角形外接圆
{
    Circle tmp;
    double a=Len(t.v[0],t.v[1]);
    double b=Len(t.v[0],t.v[2]);
    double c=Len(t.v[1],t.v[2]);
    tmp.r=a*b*c/4/TriangleArea(t);
    double a1=t.v[1].x-t.v[0].x;
    double b1=t.v[1].y-t.v[0].y;
    double c1=(a1*a1+b1*b1)/2;
    double a2=t.v[2].x-t.v[0].x;
    double b2=t.v[2].y-t.v[0].y;
    double c2=(a2*a2+b2*b2)/2;
    double d=a1*b2-a2*b1;
    tmp.center.x=t.v[0].x+(c1*b2-c2*b1)/d;
    tmp.center.y=t.v[0].y+(a1*c2-a2*c1)/d;
    return tmp;
}
void Run(int n)
{
    random_shuffle(p+1,p+n+1);//随机排序取点
    int i,j,k;
    Circle tep;
    tep.center=p[1];
    tep.r=0;
    for(i=2;i<=n;i++)
    {
        if(Len(p[i],tep.center)>tep.r+eps)
        {
            tep.center=p[i];
            tep.r=0;
            for(j=1;j<i;j++)
            {
                if(Len(p[j],tep.center)>tep.r+eps)
                {
                    tep.center.x=(p[i].x+p[j].x)/2;
                    tep.center.y=(p[i].y+p[j].y)/2;
                    tep.r=Len(p[i],p[j])/2;
                    for(k=1;k<j;k++)
                    {
                        if(Len(p[k],tep.center)>tep.r+eps)
                        {
                            Triangle t;
                            t.v[0]=p[i];
                            t.v[1]=p[j];
                            t.v[2]=p[k];
                            tep=CircleOfTriangle(t);
                        }
                    }
                }
            }
        }
    }
    printf("%lf\n",tep.r);
}
int main()
{
    int n,i;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
        scanf("%lf%lf",&p[i].x,&p[i].y);
    Run(n);
}