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)

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr long double EPS = 1e-12;

//int N, M, K, H, W, L, R;
long long int N, M, K, H, W, L, R;

long double dis(vector<long double>&x, vector<long double>&y, int i, int j) {
	return sqrt((x[i] - x[j])*(x[i] - x[j]) + (y[i] - y[j])*(y[i] - y[j]));
}

class XorShift {
	unsigned int x, y, z, w, t;
public:
	XorShift() {
		x = 133553533;
		y = 314867339;
		z = 664298413;
		w = 999999937;
		t = 0;
	}
	unsigned int rand() {
		t = x ^ (x << 11);
		x = y;
		y = z;
		z = w;
		w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
		return w & 0x7fffffff;
	}
};

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N;
	vector<long double>x(N);
	vector<long double>y(N);
	for (int i = 0; i < N; i++) {
		cin >> x[i] >> y[i];
	}
	long double ans = MOD;
	XorShift xs;
	long double cx = 500, cy = 500;
	for (int loop = 0; loop < 1000; loop++) {
		long double cdis = 0;
		x.push_back(cx);
		y.push_back(cy);
		for (int i = 0; i < N; i++) {
			//cout << max(cdis,dis(x, y, i, N)) << endl;
			cdis = max(cdis, dis(x, y, i, N));
		}
	//	cout << cdis << endl;
		x.pop_back();
		y.pop_back();
		long double dif = 500;
		for (int i = 0; i < 400; i++) {
			//cout << dif << endl;
			long double rad = xs.rand() % 360000;
			rad /= 1000;
			rad /= 180;
			rad *= 3.141592653589793238;
			long double ny = cy + sin(rad)*dif;
			long double nx = cx + cos(rad)*dif;
			//cout << ny << " " << nx << endl;
			dif *= 0.9;
			x.push_back(nx);
			y.push_back(ny);
			long double ndis = 0;
			for (int j = 0; j < N; j++) {
				ndis = max(ndis, dis(x, y, j, N));
			}
			x.pop_back();
			y.pop_back();
			//cout << cdis << " " << ndis << endl;
			if (ndis < cdis) {
				cdis = ndis;
				cx = nx, cy = ny;
			}
		}
		ans = min(ans, cdis);
	}
	cout << setprecision(20) << ans << endl;
	return 0;
}