Minimum Eating Speed — Solution & Editorial
Hours needed is non-increasing in k — binary search k in [1, max pile], computing ∑⌈p/k⌉ per candidate.
Complexity: O(N log max)
Watch out: Use integer ceiling (p + k - 1) / k, not floating point.
Hours needed is non-increasing in k — binary search k in [1, max pile], computing ∑⌈p/k⌉ per candidate.
Complexity: O(N log max)
Watch out: Use integer ceiling (p + k - 1) / k, not floating point.