Problem 3003 · Hard

Maximize the Number of Partitions After Operations

Try every single-letter change and count the greedy partitions with at most k distinct letters.

Open the interactive visualisation