Logo
(追記) (追記ここまで)

20248번 - Circles 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
8 초 1024 MB97312435.294%

문제

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.

예제 입력 1

4
0 0
1 0
1 1
0 1

예제 출력 1

3.14159265359

예제 입력 2

3
0 0
0 1
2 0

예제 출력 2

8.639379797371932

힌트

출처

ICPC > Regionals > Asia Pacific > Taiwan > Taiwan Online Programming Contest > TOPC 2020 C번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /