编程介的小学生 2017-03-12 15:04 采纳率: 20.5%
浏览 839
已采纳

Disk

Given N disks, try to calculate the area that is covered by them.

Input

The first line contains only the integer N (1 <= N <= 4).

The following N lines contain information about the N disks.

Xi Yi Ri (3 floating-point numbers)

Here (Xi, Yi) is the centre of the ith disk and Ri (0 < Ri <= 1) is its radius.

There are several testcases, so process to the end-of-file.

Output

For each testcase, output a line containing only the area that is covered by the disks.

The result should be a floating-point number, having 3 digits after radix point.

Sample Input

1
0 0 1
2
0 0 1
1 0 1

Sample Output

3.142
5.055

  • 写回答

2条回答 默认 最新

查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 luckysheet
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误