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)

#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

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

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

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, [ $t:tt ]) => {
        {
            let len = read_value!($next, usize);
            (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
        }
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        n: usize,
        xy: [(f64, f64); n],
    }
    let x = xy.iter().map(|&(xi, _)| xi).collect::<Vec<_>>();
    let y = xy.iter().map(|&(_, yi)| yi).collect::<Vec<_>>();
    if n == 2 {
        let dx = x[0] - x[1];
        let dy = y[0] - y[1];
        let r = (dx * dx + dy * dy).sqrt() / 2.;
        println!("{}", r);
        return;
    }
    let mut result = 1000.;
    for i in 0..n {
        for j in 0..i {
            for k in 0..j {
                let a = x[i] - x[j];
                let b = y[i] - y[j];
                let c = x[j] - x[k];
                let d = y[j] - y[k];
                let f = 2. * (a * d - b * c);
                let ni = x[i] * x[i] + y[i] * y[i];
                let nj = x[j] * x[j] + y[j] * y[j];
                let nk = x[k] * x[k] + y[k] * y[k];
                let cx = (d * (ni - nj) + b * (nk - nj)) / f;
                let cy = (c * (nj - ni) + a * (nj - nk)) / f;
                let r = ((x[i] - cx) * (x[i] - cx) + (y[i] - cy) * (y[i] - cy)).sqrt();
                if r < result && (0..n).all(|l| (x[l] - cx) * (x[l] - cx) + (y[l] - cy) * (y[l] - cy) - r * r <= 1e-5) {
                    result = r;
                }
            }
        }
    }
    println!("{}", result);
}