Problem 4008 · Medium

Minimum Initial Strength to Defeat All Monsters

Binary search the starting strength. Each guess replays the monsters, adding temporary boosts only to the comparison, and the least passing guess wins.

Open the interactive visualisation