#P1429. Minimum Distance Pair
Minimum Distance Pair
Minimum Distance Pair
Given n points on the plane, your task is to find the minimum Euclidean distance between any pair of these points. The Euclidean distance between two points \((x_1, y_1)\) and \((x_2, y_2)\) is given by the formula:
$$ d = \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2} $$
You are required to calculate the minimum distance among all pairs of points.
inputFormat
The first line contains an integer n indicating the number of points.
Each of the following n lines contains two space-separated integers representing the coordinates x and y of a point.
outputFormat
Output a single floating-point number that represents the minimum distance between any two points in the input. The answer should be printed with a precision of 6 decimal places.
sample
2
0 0
3 4
5.000000