Editorial for TLE '17 Contest 6 P2 - Mr. More-than-perfect
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 rather straightforward implementation problem.
One strategy was to split each line by spaces and slashes and to handle the various cases where information was missing.
For C/C++ users, using sscanf
on each line was helpful, as not only does it allow for missing input, but it returns how many reads were successful.
Time Complexity:
Comments