P1429 Closest Pair of Points in the Plane (Enhanced Version)

Background

[P7883](/problem/P7883) Closest Pair of Points in the Plane (Enhanced-Enhanced Version)

Description

Given $n$ points in the plane, find the minimum distance among all pairs of points.

Input Format

The first line contains $n$, with $2 \le n \le 200000$. Each of the next $n$ lines contains two integers $x$ and $y$, the $x$-coordinate and $y$-coordinate of a point, separated by a single space.

Output Format

Output a single real number on one line: the shortest distance, rounded to $4$ decimal places.

Explanation/Hint

The testdata guarantees $0 \le x, y \le 10^9$. Translated by ChatGPT 5