Time Limit: 3 second(s) | Memory Limit: 32 MB |
Once there was a lazy monkey in a forest. But he loved banana too much. One day there was a storm in the jungle and all the bananas fell from the trees. The monkey didn't want to lose any of the bananas. So, he wanted to find a banana such that he can eat that and he can also look after the other bananas. As he was lazy, he didn't want to move his eyes too wide. So, you have to help him finding the banana from where he can look after all the bananas but the degree of rotating his eyes is as small as possible. You can assume that the position of the bananas can be modeled as 2D points.
Here a banana is shown, from where the monkey can look after all the bananas with minimum eye rotation.
Input starts with an integer T (≤ 13), denoting the number of test cases.
Each case starts with a line containing an integer n (1 ≤ n ≤ 10^{5}) denoting the number of bananas. Each of the next n lines contains two integers x y (-10^{9} ≤ x, y ≤ 10^{9}) denoting the co-ordinate of a banana. There can me more than one bananas in the same co-ordinate.
For each case, print the case number and the minimum angle in degrees. Errors less than 10^{-6} will be ignored.
Sample Input |
Output for Sample Input |
2 1 4 4 4 0 0 10 0 10 10 2 1 |
Case 1: 0 Case 2: 45.0000000 |
Dataset is huge. Use faster I/O methods.
Developed and Maintained by
JANE ALAM JAN |
Copyright © 2012
LightOJ, Jane Alam Jan |