Editorial for ECOO '12 R2 P2 - Password Strength


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.

There are no hidden traps here, but very few test cases are given so you have to interpret the criteria and test your solution carefully before submitting. The hardest part is probably finding the longest sequences. This can be done by looping through the string, keeping track of the last character seen, and keeping count of the current and longest sequence seen so far.


Comments

There are no comments at the moment.