Editorial for Mock CCC '19 Contest 1 J3 - Liwi Sequence
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.
Authors:
We can let represent the number of occurrences of
in
. If
then we should add
to the answer. Otherwise, if
, we should add
to the answer.
Comments