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 Go (1.6) (judge verdict: Wrong Answer)

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 500001), 500000)
	return scanner
}

func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}

func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}

func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}

func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}

func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}

func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0

	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 4
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}

	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}

func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	n := getNextInt(scanner)
	pp := make([]Point, n)
	var l, r float64

	o := Point{
		x: 0,
		y: 0,
	}
	for i := 0; i < n; i++ {
		pp[i].x = getNextFloat64(scanner)
		pp[i].y = getNextFloat64(scanner)
		d := dist(o, pp[i])
		if r < d*2 {
			r = d * 2
		}
	}

	for c := 0; c < 100; c++ {
		valid := false
		m := (l + r) / 2
		for i := 0; i < n && valid == false; i++ {
			for j := 0; j < i && valid == false; j++ {
				d := dist(pp[i], pp[j])
				if d > m*2 {
					continue
				}
				cp := Point{
					x: (pp[i].x + pp[j].x) / 2.0,
					y: (pp[i].y + pp[j].y) / 2.0,
				}
				h := math.Sqrt(m*m - d*d/4)
				valid = valid || ok(m, Point{
					x: cp.x - (pp[i].y-pp[j].y)/d*h,
					y: cp.y + (pp[i].x-pp[j].x)/d*h,
				}, pp)
				valid = valid || ok(m, Point{
					x: cp.x + (pp[i].y-pp[j].y)/d*h,
					y: cp.y - (pp[i].x-pp[j].x)/d*h,
				}, pp)
			}
		}
		if valid {
			r = m
			continue
		}
		l = m
	}

	fmt.Fprintln(writer, fmt.Sprintf("%.8f", r))
}

func dist(p1, p2 Point) float64 {
	return math.Sqrt(math.Pow(p1.x-p2.x, 2) + math.Pow(p1.y-p2.y, 2))
}
func ok(r float64, p Point, pp []Point) bool {
	n := len(pp)
	for i := 0; i < n; i++ {
		d := dist(pp[i], p)
		if r < d {
			return false
		}
	}

	return true
}

// Point ...
type Point struct {
	x, y float64
}