#P1257. 平面上的最接近点对

平面上的最接近点对

Description

Given nn points in the plane, find the distance between a pair of points such that among all pairs of these nn points, this distance is the smallest.

Input Format

The first line contains an integer nn, denoting the number of points. The next nn lines each contain two integers x,yx,y, representing the xx and yy coordinates of a point.

Output Format

Output a single line containing a real number, which is the shortest distance, rounded to 44 decimal places.

3
1 1
1 2
2 2

1.0000

Hint

Constraints

For 100%100\% of the testdata, it is guaranteed that 2n1042 \leq n \leq 10^4, 0x,y1090 \leq x, y \leq 10^9.

Translated by ChatGPT 5