2266: Burning

内存限制:128 MB 时间限制:3.000 S
评测方式:文本比较 命题人:
提交:1 解决:1

题目描述

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.
 

输入

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.

输出

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.

样例输入 复制

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

样例输出 复制

1348.5621251916
706.2758371223
540.0414504206
9.9404623255
0.0000000000

来源/分类