Closest pair

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

Input

Input consists of the coordinates of n different points. The coordinates
are real numbers with absolute value at most 10⁵. Assume 2 ≤ n ≤ 10⁵.

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
