Convex hull
Hard
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
In a plane, you are given N points.
Your task is to construct the convex hull for this set of points and then calculate and output two values: the perimeter and the area of the convex hull.
Input
The first line contains the integer N, where 1 ≤ N ≤ 20000. Each of the next N lines provides two integers, representing the coordinates x_i and y_i. All coordinate values are within the range of (-10^4) to (10^4).
Output
Output two numbers: the perimeter and the area of the convex hull, each with a precision of at least 6 decimal places.
Examples
Input #1
Answer #1
Submissions 538
Acceptance rate 9%