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

32617번 - Jurassic Park 스페셜 저지다국어인터랙티브

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 1024 MB4610512.821%

문제

Having just watched the famous Spielberg film, you are determined to build your own dinosaur amusement park here in the Netherlands. However, you first need to build the enclosure for the dinosaurs.

The land you bought for the amusement park already contains a number of fence posts. The Fence Post Committee does not allow you to move them, so you'll have to build your enclosure using the fence posts you get. The committee does not disclose their reasoning behind the placement of the fence posts, but they appear to be uniformly randomly distributed across the park. The Netherlands are quite flat, so you can view the fence posts as points in the 2D plane.

Since you are on a budget, your goal is to use the least amount of fence possible to build a proper enclosure, to not let the dinosaurs escape. A proper enclosure is a closed loop of some fences, spanning between fence posts, and has a nonzero area. Furthermore, fences are not able to intersect.

입력

The input consists of:

  • One line with an integer $n$ (3ドル\leq n\leq 10,000円$), the number of fence posts on your plot of land.
  • $n$ lines, each containing two numbers $x$ and $y$ ($-1000 \leq x,y \leq 1000$), the $x$- and $y$-coordinates of a fencepost.

It is guaranteed that there are exactly 60ドル$ testcases, and the coordinates of the fence posts are uniformly randomly generated for each testcase. The samples are for illustration only.

Each of your submissions will be run on new random test cases.

출력

Output the perimeter of the smallest possible proper enclosure.

Your answer should have an absolute or relative error of at most 10ドル^{-6}$.

제한

예제 입력 1

5
1 3
4 3
1 7
8 2
9 9

예제 출력 1

12.0

예제 입력 2

5
-604.3718854196 -92.8425146554
-609.1756147387 -908.5075783224
765.1668123158 -376.9414831956
-80.3845756558 -368.1619645414
455.0030654895 857.2937202110

예제 출력 2

2163.6322472014026062

힌트

출처

University > Delft University of Technology > Freshmen Programming Contest 2023 J번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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