编程介的小学生 2017-09-29 15:52 采纳率: 20.5%
浏览 776
已采纳

Burning

Problem 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

  • 写回答

2条回答 默认 最新

  • devmiao 2017-09-30 01:29
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记