Problem E
Convex Hull
Time limit: 2s
Finding the
convex hull of a
set of points is
an important
problem that is
often part of a
larger problem.
There are many
algorithms for
finding the
convex hull.
Since problems
involving the
convex hull
sometimes
appear in the
ACM World
Finals, it is a
good idea for
contestants to
know some of
these
algorithms.
Finding the convex hull of a set of points in the plane can be divided into two sub-tasks. First,
given a set of points, find a subset of those points that, when joined with line segments, form a
convex polygon that encloses all of the original points. Second, output the points of the convex
hull in order, walking counter-clockwise around the polygon. In this problem, given a set of points,
you are required to write a program to construct the convex hull.
I