IPSC Logo

Internet Problem Solving Contest

IPSC 2009

Solution to Problem Q – Quick search

The easy set can easily be solved by hand. For the hard set it is probably faster to convert the input into a text-based format such as PNM (ImageMagick may come in handy), flood fill the polygons, and then compare each pair.