Editorial for TLE '16 Contest 8 P1 - Paper Hole Punching
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
A straightforward implementation problem.
For each page given, simply check if each character in the template is present somewhere in the page. Since the strings are listed in a certain order, we do not need to check for correct orders.
Be careful in the case where is -
, since every page can fit in this binder.
Time Complexity: , where is the total number of characters in the lines.
Comments