UVa 11096
From Algorithmist
Contents |
[edit] 11096 - Nails
[edit] Summary
Find the length of an elastic band around a set of nails on a 2-D surface.
[edit] Explanation
Find the convex hull and calculate its perimeter.
[edit] Gotchas
The initial length of the elastic is given; remember that it might be longer than the convex perimeter. Also remember to output in the correct format (to five decimal places). Also, calculations do not fit a 32-bit integer.
[edit] Input
2 2 4 0 0 0 1 1 0 1 1 5 4 0 0 0 1 1 0 1 1
[edit] Output
4.00000 5.00000