아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Circle Union

시간 제한2초메모리 제한256 MB

요약
n개의 원을 배치해 한 점이 모든 원에 포함되도록 하면서, 적어도 한 원이 덮는 영역의 넓이를 최대로 구한다.
난이도

보통10점 중 6점

유형
기하, 그리디, 정렬
정답자
아직 제출이 없습니다

문제

An arrangement of several circles in the plane is interesting if there exists a point that lies inside or on the boundary of each circle. The covered region of an arrangement consists of all points that lie inside or on the boundary of at least one of the circle.

Consider nn circles of radii r_1,…,r_nr\_1, \ldots, r\_n respectively. Find the largest possible area of the region covered by these circles in an interesting arrangement.

입력

The first line contains a single integer nn (1≤n≤1041\leq n\leq 10^4).

The second line contains nn integers r_1,…,r_nr\_1, \ldots, r\_n (1≤r_i≤1031\leq r\_i\leq 10^3).

출력

Print a single real number --- the largest possible covered area. Your answer will be considered correct if its absolute or relative error doesn't exceed 10−610^{-6}.

예제1

  1. 예제 1

    입력
    3
    10 9 8
    
    예상 출력
    726.4578311468