Problem 1326 · Hard

Minimum Number of Taps to Open to Water a Garden

Clip each tap’s watered span to the garden, then greedily open the tap that reaches farthest among those starting at or before the covered point.

Open the interactive visualisation