Problem 3259 · Medium

Maximum Energy Boost From Two Drinks

Track the best energy ending on each drink; a switch costs the hour in between, so each step looks back two hours.

Open the interactive visualisation