Time Limit: 2 Seconds
Memory Limit: 65536 KB
Given N disks, try to calculate the area that is covered by them.
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
There are several testcases, so process to the end-of-file.
For each testcase, output a line containing only the area that is covered by
The result should be a floating-point number, having 3 digits after radix point.
0 0 1
0 0 1
1 0 1
Author: SHI, Xiaohan
Source: ZOJ Monthly, June 2003