Problem 3496 · Medium

Maximize Score After Pair Deletions

Each remaining window is a contiguous block, so score every block from short to long and keep the best of three deletion choices.

Open the interactive visualisation