Problem 3147 · Medium

Taking Maximum Energy From the Mystic Dungeon

Fill a table from the right: each start collects its energy plus the best run that jumps k ahead.

Open the interactive visualisation