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 Java8 (OpenJDK 1.8.0) (judge verdict: Accepted)

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.io.BufferedOutputStream;
import java.nio.charset.Charset;
import java.util.StringTokenizer;
import java.io.OutputStreamWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.Objects;
import java.util.List;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author mikit
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        LightScanner in = new LightScanner(inputStream);
        LightWriter out = new LightWriter(outputStream);
        FEncloseAll solver = new FEncloseAll();
        solver.solve(1, in, out);
        out.close();
    }

    static class FEncloseAll {
        public void solve(int testNumber, LightScanner in, LightWriter out) {
            int n = in.ints();
            Vec2l[] ps = new Vec2l[n];
            for (int i = 0; i < n; i++) ps[i] = new Vec2l(in.longs(), in.longs());
            List<Vec2d> ms = new ArrayList<>();
            for (int i = 0; i < n; i++)
                for (int j = 0; j < i; j++)
                    ms.add(ps[i].add(ps[j]).mul(0.5));
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < i; j++) {
                    for (int k = 0; k < j; k++) {
                        Vec2l x = ps[j].sub(ps[k]);
                        Vec2l y = ps[k].sub(ps[i]);
                        Vec2l z = ps[i].sub(ps[j]);
                        long a = x.lengthSquared();
                        long b = y.lengthSquared();
                        long c = z.lengthSquared();
                        if (x.det(y) == 0 || y.det(z) == 0 || z.det(x) == 0) continue;
                        ms.add(ps[i].mul(a * (b + c - a)).add(
                                ps[j].mul(b * (c + a - b))
                        ).add(
                                ps[k].mul(c * (a + b - c))
                        ).mul(1.0 / (a * (b + c - a) + b * (c + a - b) + c * (a + b - c))));
                    }
                }
            }

            double ans = 1e20;
            for (Vec2d m : ms) {
                double r = 0.0;
                for (int l = 0; l < n; l++) {
                    r = Math.max(r, ps[l].toVec2d().distanceTo(m));
                }
                ans = Math.min(ans, r);
            }
            out.ans(ans, 18).ln();
        }

    }

    static class Vec2l implements Comparable<Vec2l> {
        public long x;
        public long y;

        public Vec2l(long x, long y) {
            this.x = x;
            this.y = y;
        }

        public Vec2l add(Vec2l other) {
            return new Vec2l(x + other.x, y + other.y);
        }

        public Vec2l sub(Vec2l other) {
            return new Vec2l(x - other.x, y - other.y);
        }

        public long det(Vec2l other) {
            return x * other.y - other.x * y;
        }

        public Vec2l mul(long c) {
            return new Vec2l(c * x, c * y);
        }

        public Vec2d mul(double c) {
            return new Vec2d(c * x, c * y);
        }

        public long lengthSquared() {
            return x * x + y * y;
        }

        public Vec2d toVec2d() {
            return new Vec2d(x, y);
        }

        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Vec2l vec2i = (Vec2l) o;
            return x == vec2i.x &&
                    y == vec2i.y;
        }

        public int hashCode() {
            return Objects.hash(x, y);
        }

        public String toString() {
            return "(" + x + ", " + y + ")";
        }

        public int compareTo(Vec2l o) {
            if (x == o.x) {
                return Long.compare(y, o.y);
            }
            return Long.compare(x, o.x);
        }

        public Vec2l clone() throws CloneNotSupportedException {
            return (Vec2l) super.clone();
        }

    }

    static class LightWriter implements AutoCloseable {
        private final Writer out;
        private boolean autoflush = false;
        private boolean breaked = true;

        public LightWriter(Writer out) {
            this.out = out;
        }

        public LightWriter(OutputStream out) {
            this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset()));
        }

        public LightWriter print(char c) {
            try {
                out.write(c);
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter print(String s) {
            try {
                out.write(s, 0, s.length());
                breaked = false;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            return this;
        }

        public LightWriter ans(double x, int n) {
            if (!breaked) {
                print(' ');
            }
            if (x < 0) {
                print('-');
                x = -x;
            }
            x += Math.pow(10, -n) / 2;
            print(Long.toString((long) x)).print('.');
            x -= (long) x;
            for (int i = 0; i < n; i++) {
                x *= 10;
                print((char) ('0' + ((int) x)));
                x -= (int) x;
            }
            return this;
        }

        public LightWriter ln() {
            print(System.lineSeparator());
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        }

        public void close() {
            try {
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

    }

    static class LightScanner {
        private BufferedReader reader = null;
        private StringTokenizer tokenizer = null;

        public LightScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public String string() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int ints() {
            return Integer.parseInt(string());
        }

        public long longs() {
            return Long.parseLong(string());
        }

    }

    static class Vec2d {
        public final double x;
        public final double y;

        public Vec2d(double x, double y) {
            this.x = x;
            this.y = y;
        }

        public double distanceSquaredTo(Vec2d other) {
            double dx = x - other.x, dy = y - other.y;
            return dx * dx + dy * dy;
        }

        public double distanceTo(Vec2d other) {
            return Math.sqrt(distanceSquaredTo(other));
        }

        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Vec2d vec2d = (Vec2d) o;
            return Double.compare(vec2d.x, x) == 0 &&
                    Double.compare(vec2d.y, y) == 0;
        }

        public int hashCode() {
            return Objects.hash(x, y);
        }

        public String toString() {
            return "(" + x + ", " + y + ")";
        }

    }
}