Smallest Sufficient Capacity — Solution & Editorial
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))
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))