Burning

Time Limit: 3000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 4629
64-bit integer IO format: %I64d      Java class name: Main
Special Judge

Description

The sky is BURNING,and you find there are n triangles on a plane.
For every point p,if there's exactly k triangles contains it,then define it's thickness as k.
For every i from 1 to n,calculate the area of all points whose thickness is i.

Input

The first line contains integer T(T <= 5),denote the number of the test cases.
For each test cases,the first line contains integer n(1 <= n <= 50),denote the number of the triangles.
Then n lines follows,each line contains six integers x1, y1, x2, y2, x3, y3, denote there's a triangle with vertices (x1, y1), (x2, y2), (x3, y3).
0 <= xi, yi <= 100 for every i.

Output

For each test cases,print n lines,the i-th is the total area for thickness i.
The answer will be considered correct if its absolute error doesn't exceed 10-4.

Sample Input

1
5
29 84 74 64 53 66
41 49 60 2 23 38
47 21 3 58 89 29
70 81 7 16 59 14
64 62 63 2 30 67

Sample Output

1348.5621251916
706.2758371223
540.0414504206
9.9404623255
0.0000000000

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .