2647. Apple Trees

单点时限: 2.0 sec

内存限制: 256 MB

There are many apple trees in Farmer Imo’s farm. He is always busy in raising cattle. To make matters worse, however, those apple trees have a hot temper and get angry unless they are well cared for. Once they get angry, annoyingly, they make their apples explode, and no one can stop them. For all that, he is working to the full right now, so he decided to employ two workers to care for these apple trees.

Upon employment, he tried to assign apple trees to two workers equally, but apple trees are distributed unequally. Additionally he hopes that the boundary of the assignments must be a straight line and intersect with his house to keep watch.

Although he knows the positions of all apple trees, he has no time to search the good boundary.It is also known that you can always assign equal number of the apple trees if the number of the apple trees is even.

His house is at (0, 0), and no apple tree is at (0, 0). No two apple trees have the same coordinates,and no two apple trees and his house are on a straight line.

So, determine the boundary which satisfies him. The boundary must be indicated by the angle between the first apple tree (measuared counter-clockwise in radians).

输入格式

The input is a sequence of datasets. A dataset is formatted as follows:

n

x1 y1

xn yn

The first line is a positive even integer n less than 10,000. The following n lines, one for each apple tree, each containing two space-separated numbers xi and yi (i = 1, ・ ・ ・ , n), indicating the coordinates of i-th apple tree. xi and yi are integers between -2,000 and 2,000 inclusive.

The end of the input is indicated by a line containing a single zero.

输出格式

For each dataset, output a line containing the angle of the boundary which distributes apple trees equally. The boundary must be at a distance of at least 10-5 from any apple tree and every dataset should have at least one solution whose boundary is more than 10-4 away from any apple tree.

Each output value should be in a decimal fraction.

The output must be written to standard output.

CAUTION!

As this problem has many solutions, your solution will be evaluated by special judge system.

样例

Input
4
1 0
0 1
1 1
-1 1
2
1 10
-1 10
0
Output
1.17809725
0.09966865
sorry for the spj is not finished

2 人解决,2 人已尝试。

2 份提交通过,共有 2 份提交。

7.7 EMB 奖励。

创建: 14 年,8 月前.

修改: 6 年,3 月前.

最后提交: 4 月,3 周前.

来源: The 1st Imos Contest