Problem 3686 · Hard

Number of Stable Subsequences

Track how many subsequences end on each parity with a run length of one or two.

Open the interactive visualisation