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

10354번 - Points 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 256 MB106402228.205%

문제

Peter and Bob are playing a "Points" game on a math sheet of paper. Peter places a few points on the paper - grid nodes. Bob wants to surround them with a polygon so that all marked nodes are lying strictly within (not at the border) the polygon. All sides of the polygon are along the sides or the diagonals of the grid cells and its perimeter is as small as possible. You must determine what is the perimeter of the polygon.

입력

The first line of the input file contains integer N – the number of points placed by Peter (1 ≤ N ≤ 100 000). Each of following N lines contains two integers xi, yi – the point coordinates placed by Peter. The coordinates by absolute value do not exceed 106. Some points can match.

출력

You need to print one number – the perimeter of the required polygon. The answer should be printed with accuracy not less than 0.001.

제한

예제 입력 1

1
0 0

예제 출력 1

5.656

예제 입력 2

2
1 1
1 2

예제 출력 2

7.656854

힌트

출처

ICPC > Regionals > Europe > Southeastern European Regional Contest > SEERC 2014 E번

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

출처

대학교 대회

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

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