BubbleLock
In a dark basement, there is a wooden case with printed solutions to all tasks in this contest. However, the basement has thick walls and a door, and a lock on the door. On the lock, there are n horizontal iron bars, and on each of the bars there is a word with letters of equal width. Each bar can be moved independently to the left or right for one or more widths of a letter. There is at least one letter that is common to all words. Therefore, bars can be lined up so that there is a vertical line of n identical letters above each other (each letter on one bar). To unlock the door, bars should be positioned in such a way that there is a maximal number of such consecutive vertical lines.
You are naturally interested in writing a program that solves this problem.
long.
Input:
3
THATBALLOONRISEDTOTHETOP
FOOTBALLWIZARDWASSLEEPY
SOHELOSTBALANCEANDDROPPEDBALLONOutput:
TBALSubmit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.