CIRUT - CIRU2

no tags 

You are given N different circles, while some region may be covered more than once.

If one region is covered by K times, then it was called a "K- Region".

So, you are expected to output the area of all the regions! (K from 1 to N)

Input

The first line is one integer n indicates the number of the circles. (1 <= n <= 1000)

Then follows n lines every line has three integers

Xi Yi Ri

indicates the coordinate of the center of the circle, and the radius. (|Xi|. |Yi|  <= 1000, 0 < Ri <= 1000)

Output

Output N lines, the i-th line output

[i] = area_of_i_region

here the area must round to  3 digits after decimal point.

Example

Input:
3
0 0 1
1 0 1
1 1 1

Output: [1] = 4.699
[2] = 1.699
[3] = 0.443

hide comments
aekdycoin: 2011-03-31 01:34:54

no same circles

z__jj: 2011-03-23 14:52:15

Would you show me a tricky data with same circles.

Last edit: 2011-03-25 04:04:45
aekdycoin: 2011-03-23 11:43:02

no.

z__jj: 2011-03-23 11:19:47

“different” seems can be ignored...
is it right?


Added by:aekdycoin
Date:2011-01-03
Time limit:1s
Source limit:80000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:AekdyCoin