Problem 4073 · Hard

Count Good Strings

A string is good exactly when every run of equal letters has odd length; the count reduces to Fibonacci numbers, computed by fast doubling.

Open the interactive visualisation