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 "bits/stdc++.h"
//region region
using std::vector;
using std::cin;
using std::cout;
using std::string;
using std::pair;
using std::queue;
using std::priority_queue;
using std::swap;
//endregion
//region define/typedef
#pragma warning(disable:4996)
//auto
#define var auto
#define cvar const auto&
//a..b-1
#define FOR(i, a, b) for(int (i) = (a); (i) < (b); (i)++)
//b..a
#define FORR(i, a, b) for(int (i) = (b); (i) >= (b); (i)--)
//0..n-1
#define rep(i, n) for(int (i) = 0; (i) < (n); (i)++)
//1..n
#define rep1(i, n) for(int (i) = 1; (i) <= (n); (i)++)
//n-1..0
#define repr(i, n) for(int (i) = (n) - 1; (i) >= 0; (i)--)
//n-1..1
#define repr1(i, n) for(int (i) = (n); (i) > 0; (i)--)
#define in1(a) cin >> a
#define in2(a, b) cin >> a >> b
#define in3(a, b, c) cin >> a >> b >> c
#define in4(a, b, c, d) cin >> a >> b >> c >> d
#define in5(a, b, c, d, e) cin >> a >> b >> c >> d >> e
#define pb push_back
#define mp std::make_pair
#define mt std::make_tuple
#define endl "\n"
#define outif(b, t, f) cout << ((b) ? (t) : (f)) << endl
#define bsort(vec) std::sort((vec).begin(), (vec).end())
#define rsort(vec) std::sort((vec).rbegin(), (vec).rend())
#define all(vec) (vec).begin(), (vec).end()
#define even(i) (!(i&1))
#define odd(i) (i&1)
#define sz(x) (int((x).size()))
#define mset(v, n) std::memset((v), n, sizeof(v))
#define setminus(v) mset(v, -1)
#define setzero(v) mset(v, 0)
#define BIT(N) (1LL<<(N))
using ll = long long;
using lld = long double;
using uint = unsigned int;
using vint = vector<int>;
using vlong = vector<ll>;
using vstr = vector<string>;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pll = pair<ll, ll>;
using vpii = vector<pii>;
using vpil = vector<pil>;
using vpll = vector<pll>;
const int MAX = 2147483647;
const int MIN = 0 - 2147483648;
const ll MAXL = 922337203685775807;
const ll MINL = 0 - 922337203685775808;
//endregion
//region methods/operator
#pragma warning (disable:6031)

ll parse(const string &num) {
  std::stringstream ss;
  ss << num << std::flush;
  ll n;
  ss >> n;
  return n;
}

string to_string(const ll n) {
  std::stringstream ss;
  ss << n << std::flush;
  return ss.str();
}

vector<string> split(const string &s, const string &delim) {
  vector<string> res;
  auto pos = 0;
  while (true) {
    const int found = s.find(delim, pos);
    if (found >= 0) {
      res.push_back(s.substr(pos, found - pos));
    } else {
      res.push_back(s.substr(pos));
      break;
    }
    pos = found + delim.size();
  }
  return res;
}

template<typename T>
string join(vector<T> &vec, const string &sep = " ") {
  var size = vec.size();
  if (size == 0) return "";
  std::stringstream ss;
  for (int i = 0; i < size - 1; i++) {
    ss << vec[i] << sep;
  }
  ss << vec[size - 1];
  return ss.str();
}

template<typename T>
std::istream &operator>>(std::istream &is, vector<T> &vec) {
  for (T &x : vec) is >> x;
  return is;
}

template<typename T>
void print(T t) {
  cout << t << endl << std::flush;
}

ll powmod(ll a, ll b, ll p) {
  ll res = 1;
  while (b > 0) {
    if (b % 2) res = res * a % p;
    a = a * a % p;
    b >>= 1;
  }
  return res;
}

ll gcd(ll a, ll b) {
  if (a < b) gcd(b, a);
  ll r;
  while ((r = a % b)) {
    a = b;
    b = r;
  }
  return b;
}

ll lcm(const ll a, const ll b) { return a / gcd(a, b) * b; }

template<class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

template<class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

//endregion
//region initialize

struct iii {
    iii() {
      cin.tie(nullptr);
      std::ios::sync_with_stdio(false);
      cout << std::fixed << std::setprecision(16);
    }
} init;

//endregion


using ld = long double;
using P = std::complex<ld>;
ld cross(const P &a, const P &b) { return a.real() * b.imag() - a.imag() * b.real(); }
const ld eps = 1e-10;
template <class iter>
std::pair<P, ld> min_ball(iter left, iter right, int seed = 1333) {
  const int n = right - left;

  assert(n >= 1);
  if (n == 1) {
    return {*left, ld(0)};
  }

  std::mt19937 _mt(seed);
  std::shuffle(left, right, _mt);
  // std::random_shuffle(left, right); // simple but deprecated

  iter ps = left;
  using circle = std::pair<P, ld>;

  auto make_circle_3 = [](const P &a, const P &b, const P &c) -> circle {
      ld A = std::norm(b - c), B = std::norm(c - a), C = std::norm(a - b),
              S = cross(b - a, c - a);
      P p = (A * (B + C - A) * a + B * (C + A - B) * b + C * (A + B - C) * c) / (4 * S * S);
      ld r2 = std::norm(p - a);
      return {p, r2};
  };

  auto make_circle_2 = [](const P &a, const P &b) -> circle {
      P c = (a + b) / (ld)2;
      ld r2 = std::norm(a - c);
      return {c, r2};
  };

  auto in_circle = [](const P &a, const circle &c) -> bool {
      return std::norm(a - c.first) <= c.second + eps;
  };

  circle c = make_circle_2(ps[0], ps[1]);

  // MiniDisc
  for (int i = 2; i < n; ++i) {
    if (!in_circle(ps[i], c)) {
      // MiniDiscWithPoint
      c = make_circle_2(ps[0], ps[i]);
      for (int j = 1; j < i; ++j) {
        if (!in_circle(ps[j], c)) {
          // MiniDiscWith2Points
          c = make_circle_2(ps[i], ps[j]);
          for (int k = 0; k < j; ++k) {
            if (!in_circle(ps[k], c)) {
              c = make_circle_3(ps[i], ps[j], ps[k]);
            }
          }
        }
      }
    }
  }
  return c;
}

int main() {
  int N;
  cin >> N;
  vector<long double> X(N), Y(N);
  rep(i, N)cin >> X[i] >> Y[i];

  vector<P> p;
  rep(i, N) {
    p.emplace_back(X[i], Y[i]);
  }
  long double data=sqrtl(min_ball(p.begin(), p.end()).second);

  cout << std::fixed << std::setprecision(20) << data << endl;


  return 0;
}