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 PHP7 (7.0.15) (judge verdict: Wrong Answer)

<?php
$n = int();
for($i = 0; $i < $n; $i++){
    list($X[], $Y[]) = ints();
}
$min = 10**10;
//2点を直径とする円に他の点が全て含まれる場合
for($i = 0; $i < $n; $i++){
    for($j = $i+1; $j < $n; $j++){
        $x = ($X[$i] + $X[$j])/2;
        $y = ($Y[$i] + $Y[$j])/2;
        $r2 = (($X[$i] - $X[$j]) ** 2 + ($Y[$i] - $Y[$j]) ** 2 ) / 4;
        if(enclose($x, $y, $r2)){
            $min = min($min, $r2);
        }
    }
}
for($i = 0; $i < $n; $i++){
    for($j = $i+1; $j < $n; $j++){
        for($k = $j+1; $k < $n; $k++){
            list($x, $y, $r2) = circleWith3Points($X[$i],$Y[$i],$X[$j],$Y[$j],$X[$k],$Y[$k]);
            if(enclose($x, $y, $r2)){
                $min = min($min, $r2);
            }
        }
    }
}
echo $min**0.5;

function circleWith3Points($x1, $y1, $x2, $y2, $x3, $y3){
    //二辺のベクトルを出す
    $xd1 = $x2-$x1;
    $yd1 = $y2-$y1;
    $xd2 = $x3-$x1;
    $yd2 = $y3-$y1;

    list($xd1, $yd1, $xd2, $yd2) = [$yd1, -$xd1, $yd2, -$xd2];//90度回転させて法線にする
    //二辺の中点を求める
    $x12 = ($x1+$x2)/2;
    $x13 = ($x1+$x3)/2;
    $y12 = ($y1+$y2)/2;
    $y13 = ($y1+$y3)/2;

    //以上より2直線の方程式は以下のように表現できる
    // xd1(Y-y12) = yd1(X-x12)
    // xd2(Y-y13) = yd2(X-x13)
    //整理すると
    // - yd1 * X + xd1 * Y - xd1 * y12 + yd1 * x12 = 0
    // - yd2 * X + xd2 * Y - xd2 * y13 + yd2 * x13 = 0
    $a1 = - $yd1;
    $b1 =   $xd1;
    $c1 = - $xd1 * $y12 + $yd1 * $x12;
    $a2 = - $yd2;
    $b2 =   $xd2;
    $c2 = - $xd2 * $y13 + $yd2 * $x13;
    if($a1*$b2 - $a2*$b1 == 0){
        return [-1,-1,-1];
    }
    $x = ($b1*$c2 - $b2*$c1)/($a1*$b2 - $a2*$b1); 
    $y = ($a2*$c1 - $a1*$c2)/($a1*$b2 - $a2*$b1); 
    $r2 = ($x1-$x)**2 + ($x2-$x)**2;

    return [$x, $y, $r2];
}
function enclose($x, $y, $r2){
    global $X, $Y, $n;
    $flag = true;
    for($i = 0; $i < $n; $i++){
        if(($X[$i]-$x)**2 + ($Y[$i]-$y)**2 > $r2 + 10**-6){
            $flag = false;
        }
    }
    return $flag;
}

function ints(){
  return array_map("intval", explode(" ", trim(fgets(STDIN))));
}
function int(){
  return intval(trim(fgets(STDIN)));
}

function o(...$val){
    if(count($val)==1)$val = array_shift($val);
    $trace = debug_backtrace();
    echo $trace[0]['line'].")";
    if(is_array($val)){
        if(count($val) == 0){
            echo "empty array";
        }elseif(!is_array(current($val))){
            echo "array:";
            echo implode(" ", $val)."\n";
        }else{
            echo "array:array\n";
            foreach($val as $row){
                echo implode(" ", $row)."\n";
            }
        }
    }else{
        echo $val."\n";
    }
}