编程介的小学生 2020-02-14 21:48 采纳率: 20.5%
浏览 72

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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 MATLAB怎么通过柱坐标变换画开口是圆形的旋转抛物面?
    • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
    • ¥15 解riccati方程组
    • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
    • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
    • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
    • ¥50 树莓派安卓APK系统签名
    • ¥65 汇编语言除法溢出问题
    • ¥15 Visual Studio问题
    • ¥20 求一个html代码,有偿