Avant-garde
시간 제한1초메모리 제한2048 MB
x축 위에 중심이 있는 최대 10개의 원이 덮는 넓이를 10% 오차로 계산한다.
문제
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 big blobs on the canvas, which are shaped like perfect circles. All the centres of the blobs lie on the -axis, so each blob is defined by a radius and -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 . So your answer is correct if:
입력
The input consists of:
- One line containing a single integer (), the number of blobs.
- lines follow, one for each blob, each containing two integers: (), the -coordinate of the centre of the blob and (), the radius of the the blob.
출력
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 .
힌트

Figure A.1: Visualization of Sample Input 2. The covered area is roughly equal to 42.