Convex hull
On the plane, given N points in their Cartesian coordinates. Find the minimum perimeter polygon containing all these points. Guaranteed that the desired polygon has non-zero area.
Specifications
Input
The first line contains the number N, then - N rows with the pairs of coordinates.
3 ≤ N ≤ 1000, -10000 ≤ xi, yi ≤ 10000, all numbers are integers, all points are distinct.
Output
Derive a single number - the length of the perimeter to one decimal place.
Problem information
Time Limit: 2 secondsMemory Limit: 64 MB
Balls for the passed test: 5
Complexity: 11% 119/134
Example
Example input5 1 0 0 1 -1 0 0 -1 0 0 |
Example output5.7 |
| ← Route 2 | Problems | Birthday → |
