IPSC Logo

Internet Problem Solving Contest

IPSC 2008

Solution to Problem H – Hidden Text

The easy input starts with a sentence about a quick brown fox. This is a reference to the famous sentence “The quick brown fox jumps over the lazy dog.” And similarly as in the original sentence, our problem statement contains each letter of the alphabet at least once. This gives you easy access to bitmaps for all letters.

Now, one possible approach is to compute the blurred version of each letter separately, and use the following observation: if a letter X was at some coordinates, then all corresponding pixels in the input file should be darker than or equal to the pixels in the separately blurred letter. This gives us a list of candidate positions for the letters. Picking the best non-overlapping matches should give you most of the letters correctly.

An alternate solution was to play around in your favorite image editor, scale the image down, apply sharpen filters, and so on. (Note that the blur from the problem statement is pretty similar to the standard Gaussian blur.)