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_imports, unused_macros, dead_code)]

macro_rules! min {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| min!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = min!($($ys),*);
        if $x < t { $x } else { t }
    }}
}
macro_rules! max {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| max!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = max!($($ys),*);
        if $x > t { $x } else { t }
    }}
}


macro_rules! ewriteln {
    ($($args:expr),*) => { let _ = writeln!(&mut std::io::stderr(), $($args),*); };
}
macro_rules! trace {
    ($x:expr) => { ewriteln!(">>> {} = {:?}", stringify!($x), $x) };
    ($($xs:expr),*) => { trace!(($($xs),*)) }
}
macro_rules! put {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        if let Some(x) = it.next() { print!("{}", x); }
        for x in it { print!(" {}", x); }
        println!("");
    }};
    ($x:expr) => { println!("{}", $x) };
    ($x:expr, $($xs:expr),*) => { print!("{} ", $x); put!($($xs),*) }
}

const M: i64 = 1_000_000_007;

fn ok(r: f64, o: (f64, f64), ps: &Vec<(f64, f64)>) -> bool {
    for &(x, y) in ps.iter() {
        if r * r < (x - o.0) * (x - o.0) + (y - o.1) * (y - o.1) {
            return false
        }
    }
    return true;
}

fn main() {
    let mut sc = Scanner::new();
    let n: usize = sc.cin();
    let ps: Vec<(f64, f64)> = (0..n).map(|_| {
        let x = sc.cin();
        let y = sc.cin();
        (x, y)
    }).collect();

    let mut ans: f64 = 3000.0;

    if n == 2 {
        let (x0, y0) = ps[0];
        let (x1, y1) = ps[1];
        let d = ((x0 - x1).powi(2) + (y0 - y1).powi(2)).sqrt();
        put!(d / 2.0);
        return;
    }

    for i in 0..n {
        for j in 0..i {
            let (x0, y0) = ps[i];
            let (x1, y1) = ps[j];
            for k in 0..j {
                let (x2, y2) = ps[k];

                let a = (x1-x2).powi(2) + (y1-y2).powi(2);
                let b = (x2-x0).powi(2) + (y2-y0).powi(2);
                let c = (x0-x1).powi(2) + (y0-y1).powi(2);

                let den = 2.0 * (a * b + b * c + c * a) - (a*a + b*b + c*c);
                let den_a = a * (b + c - a);
                let den_b = b * (c + a - b);
                let den_c = c * (a + b - c);

                if den < 0.00000001  { continue; }

                let x = (den_a * x0 + den_b * x1 + den_c * x2) / den;
                let y = (den_a * y0 + den_b * y1 + den_c * y2) / den;

                let mut left = 0.0;
                let mut right = 3000.0;
                for _ in 0..200 {
                    let mid = (left + right) / 2.0;
                    // trace!((x,y), mid, ok(mid,(x,y),&ps));
                    if ok(mid, (x, y), &ps) {
                        right = mid;
                    } else {
                        left = mid;
                    }
                }
                ans = min!(ans, right);
            }
        }
    }
    put!(ans);
}

use std::io::{self, Write};
use std::str::FromStr;
use std::collections::VecDeque;

struct Scanner { stdin: io::Stdin, buffer: VecDeque<String>, }
impl Scanner {
    fn new() -> Self { Scanner { stdin: io::stdin(), buffer: VecDeque::new() } }
    fn cin<T: FromStr>(&mut self) -> T {
        while self.buffer.len() == 0 {
            let mut line = String::new();
            let _ = self.stdin.read_line(&mut line);
            for w in line.split_whitespace() {
                self.buffer.push_back(String::from(w));
            }
        }
        self.buffer.pop_front().unwrap().parse::<T>().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> { self.cin::<String>().chars().collect() }
    fn vec<T: FromStr>(&mut self, n: usize) -> Vec<T> { (0..n).map(|_| self.cin()).collect() }
}