A box of chocolate

my public personal notebook

ASIS CTF Quals 2015 - Task grids

We are given a set of points, and we need to determine the maximum area a polygon can cover on a 2D plane using those points as vertices. We can easily see (and prove) that the polygon we need to find must contain all of those points, and it is the convex hull of that set.

I used to code Graham's scan to find a convex hull during ACM-style contests, but when I do CTF programming problems I don't need to code from scratch anymore :)). I used scipy.spatial.ConvexHull to solve it.

Here's my code:

ASIS CTF 2015 Quals - grids

Maybe my connection is a bit slow, so after 30 mins I got the flag: ASIS{f3a8369f4194c5e44c03e5fcefb8ddf6}