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)

/*
 *Author - Abhas Jain
 *Code is inside the solve function
 */
 
#include <bits/stdc++.h>
 
#define F first
#define S second
#define all(c) c.begin(), c.end()
#define endl '\n'
#define pb push_back
#define mp make_pair 
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> 
 
typedef long long ll;
typedef long double ld;

#define rep(i,a,b) for(ll i=a;i<b;i++)
#define bac(i,a,b) for(ll i=a;i>=b;i--)

 
using namespace std;
using namespace __gnu_pbds;
template <typename A, typename B>
string to_string(pair<A, B> p);
 
string to_string(const string& s) {
  return '"' + s + '"';
}
 
string to_string(const char* s) {
  return to_string((string) s);
}
 
string to_string(bool b) {
  return (b ? "true" : "false");
}
 
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
 
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
 
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
 
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
 
void debug_out() { cerr << endl; }
 
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
 
#ifdef AJ47
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 
#endif

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> oset;
typedef tree<pair<ll,ll>,null_type,less<pair<ll,ll> >,rb_tree_tag,tree_order_statistics_node_update> ordered_multiset;
mt19937 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
 
const ld PI = 3.141592653589793;
const ll INF = 9223372036854775807ll;
const ll mod = 1e9 + 7;
int n;
vector<pair<ld, ld>> v;

ld dist (ld x0, ld y0, ld x1, ld y1) {
	return sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0));
}

ld check (ld x, ld y) {
	ld ret = 0;
	for (int i = 0; i < n; ++i) {
		ret = max(ret, dist(x, y, v[i].F, v[i].S));
	}
	return ret;
}

void solve() 
{
    cin >> n;
    for (int i = 0; i < n; ++i) {
    	int a, b;
    	cin >> a >> b;
    	v.pb({a, b});
    }
    ld eps = 1e-8;
    ld ylo = 0, yhi = 1e3 + 1;
    for (int j = 0; j < 200; ++j) {
    	ld ymid = (ylo + yhi) / 2.00;
    	ld xlo = 0, xhi = 1e3 + 1;
	    for (int i = 0; i < 200; ++i) {
	    	ld mid = (xlo + xhi) / 2.00;
	    	if (check(mid, ymid) >= check(mid + eps, ymid)) {
	    		xlo = mid;
	    	} else xhi = mid;
	    }
	    ld prev = check(xlo, ymid);
	    xlo = 0, xhi = 1e3 + 1;    
	    for (int i = 0; i < 200; ++i) {
	    	ld mid = (xlo + xhi) / 2.00;
	    	if (check(mid, ymid + eps) >= check(mid + eps, ymid + eps)) {
	    		xlo = mid;
	    	} else xhi = mid;	    	
	    }
	    ld now = check(xlo, ymid + eps);
	    if (prev >= now) ylo = ymid;
	    else yhi = ymid;
    }
    ld xlo = 0, xhi = 1e3 + 1;
	for (int i = 0; i < 200; ++i) {
	    ld mid = (xlo + xhi) / 2.00;
	    if (check(mid, ylo) >= check(mid + eps, ylo)) {
	    	xlo = mid;
	    } else xhi = mid;	    	
	}
	debug(xlo, ylo);
    cout << fixed << setprecision(10) << check(xlo, ylo) << endl;
}
 
int main( )
{   
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());
    solve();
    return 0;
}