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 Rust (1.15.1) (judge verdict: Wrong Answer)

//https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8 より
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

//

fn ok(p: &[(i64, i64)], x: f64, y: f64, r: f64) -> bool {
    let eps = 1e-8;
    for &(p, q) in p.iter() {
        let p = p as f64;
        let q = q as f64;
        let dx = p - x;
        let dy = q - y;
        if (dx * dx + dy * dy).sqrt() > r + eps {
            return false;
        }
    }
    true
}

fn run() {
    input! {
        n: usize,
        p: [(i64, i64); n],
    }
    let mut ans = std::f64::MAX;
    for (i, a) in p.iter().enumerate() {
        for b in p[..i].iter() {
            let x = (a.0 + b.0) as f64 * 0.5;
            let y = (a.1 + b.1) as f64 * 0.5;
            let dx = (a.0 - b.0) as f64;
            let dy = (a.1 - b.1) as f64;
            let r = (dx * dx + dy * dy).sqrt() * 0.5;
            if ok(&p, x, y, r) && r < ans {
                ans = r;
            }
        }
    }
    for (i, &a) in p.iter().enumerate() {
        for (j, &b) in p[..i].iter().enumerate() {
            for &c in p[..j].iter() {
                let point = &p;
                let p = 2 * (a.0 - b.0);
                let q = 2 * (a.1 - b.1);
                let r = 2 * (a.0 - c.0);
                let s = 2 * (a.1 - c.1);
                if p * r - q * s == 0 {
                    continue;
                }
                let x = (a.0 + b.0) * (a.0 - b.0) + (a.1 + b.1) * (a.1 - b.1);
                let y = (a.0 + c.0) * (a.0 - c.0) + (a.1 + c.1) * (a.1 - c.1);
                let det = p * r - q * s;
                let z = s * x - q * y;
                let w = -r * x + p * y;
                let (x, y) = (z as f64 / det as f64, w as f64 / det as f64);
                let r = ((a.0 as f64 - x).powi(2) + (a.1 as f64 - y).powi(2)).sqrt();
                if ok(&point, x, y, r) && r < ans {
                    ans = r;
                }
            }
        }
    }
    println!("{:.7}", ans);
}

fn main() {
    run();
}