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

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

Circles

시간 제한8초메모리 제한1024 MB

요약
반지름 0에서 같은 속도로 자라는 원들이 다른 원과 닿으면 멈출 때, 최종적으로 모든 원이 차지하는 넓이의 합을 구한다.
난이도

보통10점 중 7점

유형
기하, 최소 신장 트리, 그래프, 정렬
정답자
아직 제출이 없습니다

문제

There are n magical circles on a plane. They are centered at (x1, y1),(x2, y2), . . . ,(xn, yn), respectively. In the beginning, the radius of each circle is 0, and the radii of all magical circles will grow at the same rate. When a magical circle touches another, then it stops growing. Write a program to calculate the total area of all magical circles at the end of growing.

입력

The first line contains an integer n to indicate the number of magical circles. The i-th of the following n lines contains two space-separated integers xi and yi indicating that the i-th magical circle is centered at (xi, yi).

A relative error of 10−6 is acceptable.

출력

Output the total area of the circles.

제한

  • 2 ≤ n ≤ 2000
  • xi, yi ∈ [−109, 109] for i ∈ {1, 2, . . . , n}.
  • All (xi, yi)’s are disinct points.

예제2

  1. 예제 1

    입력
    4
    0 0
    1 0
    1 1
    0 1
    
    예상 출력
    3.14159265359
    
  2. 예제 2

    입력
    3
    0 0
    0 1
    2 0
    
    예상 출력
    8.639379797371932