Convex hull - MarisaOJ: Marisa Online Judge

Convex hull

Time limit: 1000 ms
Memory limit: 256 MB
Determine the convex hull of n points. ### Input - The first lines contains an integer n. - The next n lines, each line contains a point (x,y). ### Output - Print p, the number of points in the convex hull on one line. - The next p lines, print the points in the convex hull in any order. ### Constraints - 1≤n≤105. - −109≤x,y≤109. ### Example Input: 871162151381195102875 Output: 7711621381195102815