Problem 3333 · Hard

Find the Original Typed String II

Each run of equal letters can be shortened to any length from 1 to its own length; count total choices minus those whose length is below k, using a DP over lengths.

Open the interactive visualisation