#P1513. 绕钉子的长绳子
绕钉子的长绳子
Description
There are cylindrical nails on the plane, each with radius . The centers of all nails form a convex polygon.
Now you need to use a rope to enclose these nails. The rope’s diameter is negligible. Find the length of the rope.
Input Format
The first line contains two numbers: an integer () and a real number .
The next lines give the coordinates of the nail centers in counterclockwise order.
The absolute value of each coordinate does not exceed .
Output Format
Output one number: the length of the rope, to decimal places.
4 1
0.0 0.0
2.0 0.0
2.0 2.0
0.0 2.0
14.28
Hint
This problem is from URAL 1020, translation from NOCOW.
Translated by ChatGPT 5
京公网安备 11011102002149号