DWITE Online Computer Programming Contest, March 2010, Problem 4
Optical Character Recognition (OCR) is the process of extracting textual information from images. While the current technology is mostly software based, rather than using optical devices, the term has stuck around.
For the problem we'll work with a very simple alphabet, each letter strictly defined by a 2x2 or 3x2 bitmap.
A - x. xx B - xx xx C - x.x xxx D - xx .x E - xxx .xx
The input will contain 5 sets, each 2 lines long, at least 2 and no longer than 30 characters long. A set will spell out some word in the above alphabet. It will always be a valid word, and it will not be ambiguous (in a way that only one possible word could make the design pattern).
The output will contain 5 lines of output -- the recognized words.
Note: you would need to take a word as a whole to distinguish between some of the cases. For example: in the below sample, while the first character could be read as C, the rest of the word would not be made of valid characters.
x.x.x xxxxx x.x.xx xxxxxx