Problem 2300 · Medium

Successful Pairs of Spells and Potions

Sort the potions, then binary search for the weakest potion that makes each spell successful.

Open the interactive visualisation