Submit | All submissions | Best solutions | Back to list |
VCIRCLES - Area of circles |
Given N circles. Calculate the total area that these N circles cover.
Input
First line: N (1 <= n <= 50)
- In the i-th line of the next n lines contains 3 integers Xi, Yi and Ri, separated by spaces. These are the coordinates of the center and the radius of the i-th circle (-10000 <= Yi-Ri, Yi+Ri, Xi-Ri, Xi+Ri <= 10000)
Output
The total area that these N circles cover with 5 digits after decimal point
Example
Input: 2 5 6 3 5 5 5 Output: 78.53982
Added by: | Phenomenal |
Date: | 2009-02-14 |
Time limit: | 2.609s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ERL JS-RHINO NODEJS PERL6 VB.NET |
Resource: | IOICAMP |
hide comments
2018-04-30 14:40:30
Any hint on how to do it ?? |
|
2014-08-25 16:06:57 Lucas Melo
I suspect the testcases are wrong. What is the output for: 1 10 -897 996 267 323 621 252 -134 700 137 529 -361 238 933 128 133 239 826 264 -267 175 297 19 204 180 94 296 190 198 626 106 ? It should be 1210155.67791 |
|
2013-07-20 15:19:38 :|
-1 0 2 1 0 2 0 1 2 |
|
2011-09-17 14:07:54 vipin
@Phenomenal : is it possible to get few more complicated testcases pls? |