8557: CGL_4_B : Diameter of a Convex Polygon
[Creator : ]
Description
Find the diameter of a convex polygon $g$. In other words, find a pair of points that have maximum distance between them.
Input
$n$
$x_1\ y_1$
$x_2\ y_2$
$\vdots$
$x_n\ y_n$
The first integer $n$ is the number of points in $g$.
In the following lines, the coordinate of the $i$-th point $p_i$ is given by two real numbers $x_i$ and $y_i$. The coordinates of points are given in the order of counter-clockwise visit of them. Each value is a real number with at most 6 digits after the decimal point.
$x_1\ y_1$
$x_2\ y_2$
$\vdots$
$x_n\ y_n$
The first integer $n$ is the number of points in $g$.
In the following lines, the coordinate of the $i$-th point $p_i$ is given by two real numbers $x_i$ and $y_i$. The coordinates of points are given in the order of counter-clockwise visit of them. Each value is a real number with at most 6 digits after the decimal point.
Output
Print the diameter of $g$ in a line. The output values should be in a decimal fraction with an error less than 0.000001.
Constraints
$3 ≤ n ≤ 80000$
$-100 ≤ x_i, y_i ≤ 100$
No point in the $g$ will occur more than once.
$-100 ≤ x_i, y_i ≤ 100$
No point in the $g$ will occur more than once.
Sample 1 Input
3
0.0 0.0
4.0 0.0
2.0 2.0
Sample 1 Output
4.00
Sample 2 Input
4
0.0 0.0
1.0 0.0
1.0 1.0
0.0 1.0
Sample 2 Output
1.414213562373