Herding Frosh
Time Limit: 1 Second Memory Limit: 32768 KB
One day, a lawn in the centre of campus became infested with Frosh. In an effort to beautify the campus, one of our illustrious senior classmen decided to round them up using a length of pink silk. Your job is to compute how much silk was required to complete the task.The senior classman tied the silk to a telephone post, and walked around the perimeter of the area containing the Frosh, drawing the silk taught so as to encircle all of them. He then returned to the telephone post. The senior classman used the minimum amount of silk necessary to encircle all the frosh plus one extra metre at each end to tie it.
You may assume that the telephone post is at coordinates (0,0), where the first dimension is North/South and the second dimension is East/West. The coordinates of the Frosh are given in metres relative to the post. There are no more than 256 Frosh.
Input
The input consists of a line specifying the number of Frosh, followed by one line per Frosh with two real numbers indicating his or her position.
Process to the end of file.
Output
The output for each case consists of a single number - the length of silk in metres, to two decimal places.
Sample Input
4 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0
Sample Output
10.83Submit
Source: University of Waterloo Local Contest 1997.10.07