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: Accepted)

// This code is generated by [cargo-atcoder](https://github.com/tanakh/cargo-atcoder)
// Original source code:
/*
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::*;

fn main() {
    input! {
        n: usize,
        p: [(f64,f64); n]
    }

    let mut res = 1000000.0f64;
    let mut l = 0.0f64;
    let mut r = 1000.;
    while (r - l).abs() > 1e-7 {
        let m1 = l + (r - l) * 1. / 3.;
        let m2 = l + (r - l) * 2. / 3.;
        let z1 = f(&p, m1);
        let z2 = f(&p, m2);
        if z1 > z2 {
            l = m1;
        } else if z1 < z2 {
            r = m2;
        } else {
            l = m1;
            r = m2;
        }
        res = res.min(z1);
        res = res.min(z2);
    }

    println!("{}", res.sqrt());
}

fn f(p: &[(f64, f64)], x: f64) -> f64 {
    let mut l = 0.0f64;
    let mut r = 1000.;
    while (l - r).abs() > 1e-7 {
        let m1 = l + (r - l) * 1. / 3.;
        let m2 = l + (r - l) * 2. / 3.;
        let z1 = g(p, x, m1);
        let z2 = g(p, x, m2);
        if z1 > z2 {
            l = m1;
        } else if z1 < z2 {
            r = m2;
        } else {
            l = m1;
            r = m2;
        }
    }
    g(&p, x, (l + r) / 2.)
}

fn g(p: &[(f64, f64)], x: f64, y: f64) -> f64 {
    p.iter()
        .map(|(x1, y1)| {
            let dx = x1 - x;
            let dy = y1 - y;
            dx * dx + dy * dy
        })
        .fold(0.0 / 0.0, |m, v| v.max(m))
}
*/

fn main() {
    let exe = "/tmp/bin6E3BE4FF";
    std::io::Write::write_all(&mut std::fs::File::create(exe).unwrap(), &decode(BIN)).unwrap();
    std::fs::set_permissions(exe, std::os::unix::fs::PermissionsExt::from_mode(0o755)).unwrap();
    std::process::exit(std::process::Command::new(exe).status().unwrap().code().unwrap())
}

fn decode(v: &str) -> Vec<u8> {
    let mut ret = vec![];
    let mut buf = 0;
    let mut tbl = vec![64; 256];
    for i in 0..64 { tbl[TBL[i] as usize] = i as u8; }
    for (i, c) in v.bytes().filter_map(|c| { let c = tbl[c as usize]; if c < 64 { Some(c) } else { None } }).enumerate() {
        match i % 4 {
            0 => buf = c << 2,
            1 => { ret.push(buf | c >> 4); buf = c << 4; }
            2 => { ret.push(buf | c >> 2); buf = c << 6; }
            3 => ret.push(buf | c),
            _ => unreachable!(),
        }
    }
    ret
}

const TBL: &'static [u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const BIN: &'static str = "<base64-encoded ELF executable removed>";