Problem 877 · Medium

Stone Game

Interval DP on the best score lead a player can force on every sub-row of piles.

Open the interactive visualisation