Closest pair

Given several points on the plane, compute the Euclidean distance between the closest pair.

Input

Input consists of the coordinates of nn different points. The coordinates are real numbers with absolute value at most 10510^5. Assume 2n1052 \le n \le 10^5.

Output

Print the smallest distance between all pairs of points, with five digits after the decimal point. The input cases have no precision issues.

Problem information

Author: Jordi Petit

Generation: 2026-01-25T11:36:14.392Z

© Jutge.org, 2006–2026.
https://jutge.org