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: Wrong Answer)

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <vector>
#include <iomanip>
#include <sstream>
#include <bitset>
#define ALL(x) (x).begin(), (x).end()
#define sz(a) int(a.size())
#define rep(i,x,n) for(int i=x;i<n;i++)
#define repd(i,x,n) for(int i=x;i<=n;i++)
#define pii pair<int,int>
#define pll pair<long long ,long long>
#define gbtb ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define MS0(X) memset((X), 0, sizeof((X)))
#define MSC0(X) memset((X), '\0', sizeof((X)))
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define eps 1e-6
#define chu(x) cout<<"["<<#x<<" "<<(x)<<"]"<<endl
#define du3(a,b,c) scanf("%d %d %d",&(a),&(b),&(c))
#define du2(a,b) scanf("%d %d",&(a),&(b))
#define du1(a) scanf("%d",&(a));
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
ll powmod(ll a, ll b, ll MOD) { if (a == 0ll) {return 0ll;} a %= MOD; ll ans = 1; while (b) {if (b & 1) {ans = ans * a % MOD;} a = a * a % MOD; b >>= 1;} return ans;}
ll poww(ll a, ll b) { if (a == 0ll) {return 0ll;} ll ans = 1; while (b) {if (b & 1) {ans = ans * a ;} a = a * a ; b >>= 1;} return ans;}
void Pv(const vector<int> &V) {int Len = sz(V); for (int i = 0; i < Len; ++i) {printf("%d", V[i] ); if (i != Len - 1) {printf(" ");} else {printf("\n");}}}
void Pvl(const vector<ll> &V) {int Len = sz(V); for (int i = 0; i < Len; ++i) {printf("%lld", V[i] ); if (i != Len - 1) {printf(" ");} else {printf("\n");}}}
inline long long readll() {long long tmp = 0, fh = 1; char c = getchar(); while (c < '0' || c > '9') {if (c == '-') fh = -1; c = getchar();} while (c >= '0' && c <= '9') tmp = tmp * 10 + c - 48, c = getchar(); return tmp * fh;}
inline int readint() {int tmp = 0, fh = 1; char c = getchar(); while (c < '0' || c > '9') {if (c == '-') fh = -1; c = getchar();} while (c >= '0' && c <= '9') tmp = tmp * 10 + c - 48, c = getchar(); return tmp * fh;}
const int maxn = 1000010;
const int inf = 0x3f3f3f3f;
/*** TEMPLATE CODE * * STARTS HERE ***/
int n;
typedef long double ld;
struct Point
{
    long double x, y;
    Point() {}
    Point(long double _x, long double _y)
    {
        x = _x; y = _y;
    }
    Point operator -(const Point &b)const
    {
        return Point(x - b.x, y - b.y);
    }
    //虏忙禄媒
    double operator ^(const Point &b)const
    {
        return x * b.y - y * b.x;
    }
    //碌茫禄媒
    double operator *(const Point &b)const
    {
        return x * b.x + y * b.y;
    }
    //脠脝脭颅碌茫脨媒脳陋陆脟露脠B拢篓禄隆露脠脰碌拢漏拢卢潞贸x,y碌脛卤盲禄炉
    void transXY(long double B)
    {
        long double tx = x, ty = y;
        x = tx * cos(B) - ty * sin(B);
        y = tx * sin(B) + ty * cos(B);
    }
    ld distance(Point bb)
    {
        // chu(sqrtl((x - bb.x) * (x - bb.x) + (y - bb.y) * (y - bb.y)));
        return sqrtl((x - bb.x) * (x - bb.x) + (y - bb.y) * (y - bb.y));
    }
};
Point a[maxn];
long double getdist(Point aa, Point bb)
{
    return sqrtl((aa.x - bb.x) * (aa.x - bb.x) + (aa.y - bb.y) * (aa.y - bb.y));
}
struct Circle
{
    Point center;
    long double  r;
    Circle() {}
    Circle(Point c1, long double r1) {
        center = c1;
        r = r1;
    }

};
Circle makeCircumcircle(const Point &a, const Point &b, const Point &c) {
    // Mathematical algorithm from Wikipedia: Circumscribed circle
    long double ox = (min(min(a.x, b.x), c.x) + max(min(a.x, b.x), c.x)) / 2;
    long double oy = (min(min(a.y, b.y), c.y) + max(min(a.y, b.y), c.y)) / 2;
    long double ax = a.x - ox,  ay = a.y - oy;
    long double bx = b.x - ox,  by = b.y - oy;
    long double cx = c.x - ox,  cy = c.y - oy;
    long double d = (ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)) * 2;
    // if (d == 0)
    //     return Circle::INVALID;
    long double x = ((ax * ax + ay * ay) * (by - cy) + (bx * bx + by * by) * (cy - ay) + (cx * cx + cy * cy) * (ay - by)) / d;
    long double y = ((ax * ax + ay * ay) * (cx - bx) + (bx * bx + by * by) * (ax - cx) + (cx * cx + cy * cy) * (bx - ax)) / d;
    Point p{ox + x, oy + y};
    long double r = max(max(p.distance(a), p.distance(b)), p.distance(c));
    // chu(r);
    return Circle(p, r);
}
bool check(Point center, long double r)
{
    repd(i, 1, n)
    {
        if (getdist(center, a[i]) - r > eps)
            return 0;
    }
    return 1;
}
int main()
{
    //freopen("D:\\code\\text\\input.txt","r",stdin);
    //freopen("D:\\code\\text\\output.txt","w",stdout);
    gbtb;
    cin >> n;
    // n = readint();
    repd(i, 1, n)
    {
        cin >> a[i].x >> a[i].y;
    }
    if (n == 2)
    {
        cout << fixed << setprecision(10) << getdist(a[1], a[2]) / 2.0 << endl;
        return 0;
    }
    long double ans = 1e9;
    repd(i, 1, n)
    {
        repd(j, 1, n)
        {
            if (j == i)
                continue;
            repd(k, 1, n)
            {
                if (k == i || k == j)
                    continue;
                Circle res = makeCircumcircle(a[i], a[j], a[k]);
                cout << res.center.x << " " << res.center.y << " " << res.r << endl;
                if (check(res.center, res.r))
                {
                    ans = min(ans, res. r);
                }
            }
        }
    }
    cout << fixed << setprecision(10) << ans << endl;
    return 0;
}