Mock CCC '18 Contest 3 J5/S3 - A Cookie-Cutter Problem

View as PDF

Submit solution

Points: 7 (partial)
Time limit: 0.6s
Memory limit: 1G

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Richard got annoyed at Nick for writing problems that were too cookie-cutter, so he decided to write a problem about cookies.

Nick has highlighted N points on the xy-plane and wants to see them covered by a cookie. Richard doesn't think Nick deserves a lot of cookies, so he will bake a single cookie. Being a master baker, the cookies he bakes are perfectly circular. Furthermore, he will bake the smallest possible cookie that, when placed optimally on the plane, will cover all of the points that Nick has highlighted.


1 \le N \le 15

-10^6 \le x_i, y_i \le 10^6

There are 15 batches, each one has a distinct value of N.

Input Specification

The first line contains a single integer N.

Each of the next N lines contains two space-separated integers, x_i and y_i, representing one of the points Nick has highlighted. Nick is dumb and may have highlighted the same point more than once.

Output Specification

Output, on a single line, the radius of the cookie that Richard will bake.

Your answer will be considered correct if it has absolute or relative error at most 10^{-9} from the reference solution.

Sample Input

17 17
17 17

Sample Output


Sample Input

0 0
1 0

Sample Output



  • 4
    apass_jack  commented on Feb. 11, 2018, 7:24 p.m.

    LOL so many tests