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# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	const double eps = 1e-12;
	public void Solve(){
		
		double mi = 1e18;
		for(int i=0;i<N;i++){
			for(int j=i+1;j<N;j++){
				double cx = (X[i] + X[j])/2.0;
				double cy = (Y[i] + Y[j])/2.0;
				double r2 = (cx - X[i]) * (cx - X[i]) + (cy - Y[i]) * (cy - Y[i]);
				bool chk = true;
				for(int k=0;k<N;k++){
					//Console.WriteLine((cx - X[k]) * (cx - X[k]) + (cy - Y[k]) * (cy - Y[k]));
					chk &= (cx - X[k]) * (cx - X[k]) + (cy - Y[k]) * (cy - Y[k]) < r2 + eps;
				}
				//Console.WriteLine("{0} {1} {2} {3}",chk,cx,cy, r2);
				if(chk){
					mi = Math.Min(mi, r2);
				}
			}
		}
		if(N == 2){
			Console.WriteLine(Math.Sqrt(mi));
			return;
		}
		
		for(int i=0;i<N;i++){
			for(int j=i+1;j<N;j++){
				for(int k=j+1;k<N;k++){
					
					if(Det(X[i] - X[k], Y[i] - Y[k], X[j] - X[k], Y[j] - Y[k]) == 0) continue;
					double cx = 0, cy = 0;
					sol(2*(X[i] - X[j]), 2*(Y[i] - Y[j]), 2*(X[i] - X[k]), 2*(Y[i] - Y[k]),
						(X[i] * X[i] - X[j] * X[j] + Y[i] * Y[i] - Y[j] * Y[j]),
						(X[i] * X[i] - X[k] * X[k] + Y[i] * Y[i] - Y[k] * Y[k]),
						ref cx, ref cy);
					
					double r2 = (cx - X[i]) * (cx - X[i]) + (cy - Y[i]) * (cy - Y[i]);
					bool chk = true;
					for(int kk=0;kk<N;kk++){
						chk &= (cx - X[kk]) * (cx - X[kk]) + (cy - Y[kk]) * (cy - Y[kk]) < r2 + eps;
					}
					if(chk){
						mi = Math.Min(mi, r2);
					}
					
					
				}
			}
		}
		
		
		Console.WriteLine(Math.Sqrt(mi));
		
		
		
	}
	
	long Det(long a, long b, long c, long d){
		return a * d - b * c;
	}
	void sol(double a, double b, double c, double d, double x, double y, ref double z, ref double w){
		double det = a * d - b * c;
		z = (d * x - b * y) / det;
		w = (-c * x + a * y) / det;
	}
	
	
	
	
	int N;
	int[] X,Y;
	public Sol(){
		N = ri();
		X = new int[N];
		Y = new int[N];
		for(int i=0;i<N;i++){
			var d = ria();
			X[i] = d[0];
			Y[i] = d[1];
		}
	}

	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);}
	static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));}
	static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));}
	static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));}
}