Bridge
시간 제한1초메모리 제한2048 MB
x축 단조인 단순 다각형 경로가 주어질 때, 수평 다리 하나를 놓아 그래프의 지름을 최소화하고 그 하한을 출력한다.
문제
You are given a simple polygonal path with for every in the plane. Every segment of has a positive length and no two segments of intersect, except at their endpoints. The distance between any two points , in is the length of the path from to along , that is, the sum of segment lengths of the path. The diameter of is the maximum of all possible distances between two points in .
For example, consider a polygonal path as shown in Figure (a) below. The distance between the two midpoints , of the segments is the sum of lengths of segments and . The diameter of is the distance between the two end vertices , of , that is the sum of lengths of segments and .

Now we add a bridge to . A bridge of is a segment parallel to the -axis and connecting two points of such that for every point of , except the endpoints of , has no point with and , where is the -coordinate and is the -coordinate of a point in the plane. Then a path connecting two points of can use by entering and exiting at the endpoints of . Thus, the distance between two points of is the length of the shorter path between the path using and the path not using .
For example, if we add a bridge as shown in Figure (b) above, the distance between and is by the path using , where is the length of . The distance between and is the smaller between the length of the path using and the length of the path not using .
Given a simple polygonal path with for every , write a program to output the infimum (greatest lower bound) of diameters of using a bridge.
입력
Your program is to read from standard input. The first line contains the number () of vertices of with for every . In the next lines, the -th line contains the -coordinate and the -coordinate of () . All the coordinates are integers, and no two vertices are at the same position.
출력
Your program is to write to standard output. Print the infimum of diameters of using a bridge. If no bridge can be placed on , print the diameter of with no bridge. The output should be in the format that consists of its integer part, a decimal point, and its fractional part, and will be decided to “correct” if it holds that , where denotes the exact answer.