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.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace AtCoder
{
    class Program
    {
        private static string Read() { return Console.ReadLine(); }
        private static int ReadInt() { return int.Parse(Read()); }
        private static long ReadLong() { return long.Parse(Read()); }
        private static double ReadDouble() { return double.Parse(Read()); }
        private static int[] ReadInts() { return Array.ConvertAll(Read().Split(), int.Parse); }
        private static long[] ReadLongs() { return Array.ConvertAll(Read().Split(), long.Parse); }
        private static double[] ReadDoubles() { return Array.ConvertAll(Read().Split(), double.Parse); }

        class Point
        {
            public readonly double x;
            public readonly double y;
            public Point(double[] args)
            {
                x = args[0];
                y = args[1];
            }
            public Point(double x, double y)
            {
                this.x = x;
                this.y = y;
            }
        }

        static bool Online(Point p1, Point p2, Point p3)
        {
            return p1.y * (p2.x - p3.x) + p2.y * (p3.x - p1.x) + p3.y * (p1.x - p2.x) == 0;
        }

        static Point Center(Point p1, Point p2, Point p3)
        {
            double a = p2.x - p1.x;
            double b = p2.y - p1.y;
            double c = p3.x - p1.x;
            double d = p3.y - p1.y;

            double x = p1.x + (d * (a * a + b * b) - b * (c * c + d * d)) / (a * d - b * c) / 2;
            double y = (b != 0) ? (a * (p1.x + p2.x - x - x) + b * (p1.y + p2.y)) / b / 2
                                : (c * (p1.x + p3.x - x - x) + d * (p1.y + p3.y)) / d / 2;
            return new Point(x, y);
        }

        static double Distance(Point p1, Point p2)
        {
            double x = p1.x - p2.x;
            double y = p1.y - p2.y;
            return Math.Sqrt(x * x + y * y);
        }

        static double Solve(int N, Point[] P)
        {
            double min = double.MaxValue;
            for (int i = 0; i < N; ++i)
            {
                for (int j = i + 1; j < N; ++j)
                {
                    {
                        var o = new Point((P[i].x + P[j].x) * 0.5, (P[i].y + P[j].y) * 0.5);
                        double r = Distance(P[i], P[j]) * 0.5;
                        if (P.All(p => Distance(o, p) <= r)) { min = Math.Min(r, min); }
                    }
                    for (int k = j + 1; k < N; ++k)
                    {
                        if (!Online(P[i], P[j], P[k]))
                        {
                            var o = Center(P[i], P[j], P[k]);
                            double r = Distance(P[i], o);
                            if (P.All(p => Distance(o, p) <= r)) { min = Math.Min(r, min); }
                        }
                    }
                }
            }
            return min;
        }

        static void Main(string[] args)
        {
            int N = ReadInt();
            var P = new Point[N];
            for (int i = 0; i < N; ++i) { P[i] = new Point(ReadDoubles()); }
            Console.WriteLine(Solve(N, P));
        }
    }
}