Editorial for COCI '14 Contest 3 #1 Strojopis


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.

One of the possible solutions is to define eight arrays of characters (strings) where each of them consists of the characters corresponding to one finger. Using a for loop over the input string, in the inner loop we check whether which of the defined eight strings contains the current character and increment (by one) the counter of number of presses the corresponding finger made. Those counters are elements of an array of eight elements that we will output in the end.


Comments

There are no comments at the moment.