시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 2048 MB | 22 | 14 | 13 | 65.000% |
A new style of painting has recently exploded in popularity. The artist will start with some famous artwork as the background, and proceeds to splash big blobs of paint on the canvas. You think this new art form is terrible. To prove a point, you want to estimate the area of the nice background picture that gets ruined, because it gets covered by the blobs.
The artist has splashed $n$ big blobs on the canvas, which are shaped like perfect circles. All the centres of the blobs lie on the $x$-axis, so each blob is defined by a radius and $x$-coordinate. The second sample input is visualized in Figure A.1.
Calculate the area of the background that is no longer visible, because of the blobs. Your answer is correct if its relative error is less than $10\%$. So your answer is correct if: $$0.9 \times A_\textrm{actual} \leq A_\textrm{your output} \leq 1.1 \times A_\textrm{actual} $$
The input consists of:
Output the area of the background that is covered by the blobs as a decimal number. Your answer should have a relative error of at most $10\%$.
11 1
3.1415926583406
3-6 10 34 2
41.9925053413308
3-4 3-4 1-4 3
28.2743338897644
Figure A.1: Visualization of Sample Input 2. The covered area is roughly equal to 42.