PivotOJ

Building Roads

시간 제한: 2000ms메모리 제한: 1024MB출처: ICPC Rocky Mountain Regional 2023-2024BOJ 30556

문제

A multi-billionaire has a vision to build a completely new city from scratch. After much research and consultations, locations have been selected for all the houses, shopping malls, restaurants, etc. Roads now have to be added to ensure that every location is reachable by any other location, but only the minimum number of roads should be built. For environmental reasons, it is also desirable to minimize the longest travel between two locations. Each road must connect two locations, but roads may cross each other by adding overpasses (so traffic cannot switch to a different road between locations).

What is the minimum length in the longest travel in the road network designed?

입력

The first line of input contains an integer 2N2002 \leq N \leq 200 specifying the number of locations to follow. Each of the next NN lines contains two integers xix_i and yiy_i (5000xi,yi5000-5000 \leq x_i, y_i \leq 5000), specifying the coordinates of the iith location. All coordinates are specified in meters, and all locations are distinct.

출력

Output the minimum possible length (in meters) of the longest travel between two locations. Your answer should have a relative or absolute error of less than 10310^{-3}.

예제

예제 1

입력
3
0 0
10 0
0 10
출력
20.0000000000

예제 2

입력
9
0 0
10 0
0 10
-10 0
0 -10
10 10
10 -10
-10 10
-10 -10
출력
28.2842712475
코드를 제출하려면 로그인하세요.