Editorial for COCI '20 Contest 5 #1 Šifra


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.

With the first loop we pass through the word, and when we come across a digit, we convert the next few digits into the corresponding number and skip those digits in the main loop.

As the numbers have at most three digits, we can have an additional boolean array in which the i^\text{th} element tells us whether we have found the number i in the word.


Comments

There are no comments at the moment.