Editorial for WC '18 Finals J2 - Script Doctor


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.

For each occurrence of bull, removing the b may not be sufficient – for example, the string bbull would be reduced to bull, which still contains bull. Similarly, removing an l may not be sufficient.

However, removing the u is always sufficient for wiping out the bull occurrence. Therefore, we'll want to replace each occurrence of bull with bll.


Comments

There are no comments at the moment.