Problems > Smallest Sufficient Capacity > Editorial

Smallest Sufficient Capacity — Solution & Editorial

Back to the Problem

The predicate 'capacity c suffices' is monotone. Binary search c in [max w, sum w]; the check greedily fills each day.

Complexity: O(N log(sum))