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.

Author: ZQFMGB12

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 T is -, since every page can fit in this binder.

Time Complexity: \mathcal{O}(|T||S|), where |S| is the total number of characters in the N lines.


Comments

There are no comments at the moment.