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 <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <fstream>
#include <string>
#include <math.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, P> T;

const ll mod = 1000000007;
const ll INF = 100000010000;

ll N;
double x[55], y[55];
double ans;

ll gcd(ll x, ll y)
{
	if (y == 0) return x;
	return gcd(y, x % y);
}

ll pow_mod(ll x, ll y)
{
	if (y == 0) return 1;
	if (y % 2 == 1)
	{
		return x * pow_mod(x, y - 1) % mod;
	}
	else
	{
		ll half = pow_mod(x, y / 2);
		return half * half % mod;
	}
}

ll div_mod(ll x)
{
	return pow_mod(x, mod - 2);
}

void init()
{
	cin >> N;
	for (int i = 0; i < N; i++)
	{
		cin >> x[i] >> y[i];
	}
}

void output()
{
	printf("%.7f\n", ans);
}



void solve()
{
	if (N == 2)
	{
		ans = sqrt((x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]));
		ans /= 2;
		return;
	}
	
	for (int i = 0; i < N; i++)
	{
		for (int j = i + 1; j < N; j++)
		{
			for (int k = j + 1; k < N; k++)
			{
				double a, b, c, d, e, f, px, py;
				a = x[i], b = y[i], c = x[j], d = y[j], e = x[k], f = y[k];

				ll u, v, w, q;
				u = x[i] - x[j], v = y[i] - y[j];
				w = x[k] - x[j], q = y[k] - y[j];
				if (u * q == v * w)
				{
					ans = max(ans, sqrt(u * u + v * v));
					ans = max(ans, sqrt(w * w + q * q));
					ans = max(ans, sqrt((x[i] - x[k]) * (x[i] - x[k]) + (y[i] - y[k]) * (y[i] - y[k])));
					continue;
				}

				py = (e - a)*(a*a + b*b - c*c - d*d) -(c - a)*(a*a + b*b - e*e - f*f);
				py /= 2 * (e-a)*(b-d)-2*(c-a)*(b-f);
				if (c - a != 0)
				{
					px = 2 * (b - d)*py - a * a - b * b + c * c + d * d;
					px /= 2 * (c - a);
				}
				else
				{
					px = 2 * (b - f)*py - a * a - b * b + e * e + f * f;
					px /= 2 * (e - a);
				}
				ans = max(sqrt((px - a)*(px - a) + (py - b)*(py - b)), ans);
			}
		}
	}
}

int main()
{
	init();

	solve();



	output();
	ll N;
	cin >> N;
}