Enlarge Circles

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

요약
N개의 점 각각을 중심으로 하는 원을 반지름 0도 허용하면서 서로 겹치지 않고 접촉만 하도록 배치해 둘레 합의 최댓값을 구한다.
난이도

보통10점 중 7점

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

문제

You are given NN distinct points on the 2-D plane. For each point, you are going to make a single circle whose center is located at the point. Your task is to maximize the sum of perimeters of these NN circles so that circles do not overlap each other. Here, "overlap" means that two circles have a common point which is not on the circumference of at least either of them. Therefore, the circumferences can be touched. Note that you are allowed to make a circle with radius 00.

입력

The input consists of a single test case in the following format.

$N$
$x_{1}$ $y_{1}$
$\vdots$
$x_{N}$ $y_{N}$

The first line contains an integer NN, which is the number of points (2≤N≤2002 \le N \le 200). Each of the following NN lines gives the coordinates of a point. Integers x_ix\_i and y_iy\_i (−100≤x_i,y_i≤100−100 ≤ x\_i, y\_i ≤ 100) in the ii-th line of them give the xx- and yy-coordinates, respectively, of the ii-th point. These points are distinct, in other words, (x_i,y_i)≠(x_j,y_j)(x\_i, y\_i) \ne (x\_j, y\_j) is satisfied if ii and jj are different.

출력

Output the maximized sum of perimeters. The output can contain an absolute or a relative error no more than 10−610^{-6}.

예제3

  1. 예제 1

    입력
    3
    0 0
    3 0
    5 0
    
    예상 출력
    31.415926535
    
  2. 예제 2

    입력
    3
    0 0
    5 0
    0 5
    
    예상 출력
    53.630341225
    
  3. 예제 3

    입력
    9
    91 -18
    13 93
    73 -34
    15 2
    -46 0
    69 -42
    -23 -13
    -87 41
    38 68
    
    예상 출력
    1049.191683488