### 2001 Canadian Computing Competition, Stage 1

## Problem S4: Cookies

Making chocolate chip cookies involves mixing flour, salt, oil, baking soda and chocolate chips to form dough which is rolled into a plane. Circles are cut from the plane, placed on a cookie sheet, and baked in an oven for about twenty minutes. When the cookies are done, they are removed from the oven and allowed to cool before being eaten.

We are concerned here with the process of cutting a single round cookie that contains all the chocolate chips.

Once the dough has been rolled, each chip is visible in the planar dough, so we need simply to find a cookie cutter big enough to circle all the chips.

What is the diameter of the smallest possible round cookie containing all the chips?

### Input

Input consists of a positive integer *n* not greater than 10, followed by *n* lines of input.

Each line gives the coordinates of one chocolate chip on the plane.

Each coordinate is an integer in the range [0,1000].

### Output

Output consists of a single real number, the diameter of the cookie rounded to two decimal places.

### Sample Input 1

4 1 1 1 0 0 1 0 0

### Sample Output 1

1.41

### Sample Input 2

3 1 1 10 0 0 0

### Sample Output 2

10.00

All Submissions

Best Solutions

**Point Value:** 10

**Time Limit:** 2.00s

**Memory Limit:** 16M

**Added:** Sep 27, 2008

**Problem Types:**[Show]

**Languages Allowed:**

C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

## Comments (Search)

fifimanon Jan 05, 2015 - 11:40:15 pm UTC ErrorAlexon Jan 06, 2015 - 7:58:51 am UTC Re: Errorthorthugnastyon Jan 15, 2014 - 3:21:44 am UTCBobon Feb 21, 2009 - 12:53:30 am UTC How do u find the smallest diameter?bleung91on Feb 21, 2009 - 2:54:27 am UTC Re: How do u find the smallest diameter?*Phew* Now that we've got that aside, maybe you're not considering the fact that there can be obtuse angles formed by a set of three points. IN that case, the maximum diameter isn't what everyone has been looking up to find a formula for.

zerglingrushon Dec 22, 2008 - 2:06:24 pm UTC first examplebleung91on Dec 22, 2008 - 10:12:47 pm UTC Re: first examplebleung91on Dec 22, 2008 - 10:14:37 pm UTC Re: Re: first examplehttp://www.teachrkids.com/fronts/rounding.htm