#P4423. [BJWC2011] 最小三角形

[BJWC2011] 最小三角形

Description

Xaviera has encountered an interesting problem.

There are NN points on the plane. Xaviera wants to find the triangle with the minimum perimeter.

Because there are many points and they are distributed irregularly, Xaviera asks you to solve this problem.

To reduce the difficulty, triangles also include three collinear points.

Input Format

The first line contains an integer NN representing the number of points.

The next NN lines each contain two integers, representing the coordinates of a point.

Output Format

Output a single line containing the minimum triangle perimeter, rounded to 66 decimal places.

4
1 1
2 3
3 3
3 4
3.414214

Hint

Constraints: For all testdata, 3N2×1053 \leq N \leq 2\times 10^5.

Translated by ChatGPT 5