Problem 2539 · Hard

Count the Number of Good Subsequences

For each k, multiply (1 + C(count, k)) across letters and remove the empty choice; sum over k.

Open the interactive visualisation