Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
LL’s cake
Time Limit: 1000MSMemory Limit: 65536K
Total Submissions: 552Accepted: 149

Description

LL bought a big cake on his birthday, which was circle looked from above. HH found it and cut the cake into pieces secretly using a big knife. Each cut was a straight line through the cake. Since HH cut it irregularly, the cake was cut into a mess. Of course at last LL found it and got angry, so he decided to discuss with HH.

LL :"I planed to share it with you at the beginning, but now you can only eat one piece."

HH :"OK... I will choose the largest piece..."

Please help HH to choose the largest one.

Input

The first line of input contains one integer specifying the number of test cases to follow. Each test case begins with a line containing one integer N (1 ≤ N ≤ 100), the number of cut HH performed.

Following N lines each contains two numbers describe the ith cut as following:

Suppose the origin is at the center of the cake. Each cut intersects the cake at two points. The polar angles of the two intersections are the given two numbers. They are in range [-π, π).

Note: No three cut intersects at one point. Any two cut are distinct. The cake has radius 10.0.

Output

For each test case, output a line containing one number - the area of the largest piece rounded to hundreds.

Sample Input

3
2
-3.140000 0.000000
-1.000000 1.000000
2
-3.141592 0.000000
-1.570796 1.570796
3
-3.000000 3.000000
-2.000000 2.000000
-1.000000 1.000000

Sample Output

129.96
78.54
183.30

Source

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator