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 run() {
    input! {
        n: usize,
        p: [(f64, f64); n],
    }
    let calc = |x: f64, y: f64| -> f64 {
        let mut res = 0f64;
        for p in p.iter() {
            let dx = x - p.0;
            let dy = y - p.1;
            let d = (dx * dx + dy * dy).sqrt();
            res = res.max(d);
        }
        res
    };
    let f = |x: f64| -> f64 {
        let mut d = 0f64;
        let mut u = 1000f64;
        for _ in 0..60 {
            let dd = (2.0 * d + u) / 3f64;
            let uu = (d + 2.0 * u) / 3f64;
            if calc(x, dd) > calc(x, uu) {
                d = dd;
            } else {
                u = uu;
            }
        }
        (u + d) * 0.5
    };
    let mut l = 0f64;
    let mut r = 1000f64;
    for _ in 0..60 {
        let ll = (2.0 * l + r) / 3.0;
        let rr = (l + 2.0 * r) / 3.0;
        let ly = f(ll);
        let ry = f(rr);
        if calc(ll, ly) > calc(rr, ry) {
            l = ll;
        } else {
            r = rr;
        }
    }
    let ans = f((l + r) * 0.5);
    println!("{:.7}", ans);
}

fn main() {
    run();
}