Editorial for COCI '15 Contest 2 #1 Marko
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.
The simplest solution for this task is to transform each word from the dictionary into a sequence of keypresses that result in the given word. Therefore, we transform each word into that sequence of keypresses, e.g. ana
→ 262
. Finally, we simply count how many "transformed" words from the input are equal to the input sequence of keypresses.
Comments