Problem 2604 · Hard

Minimum Time to Eat All Grains

Hens walk along a line at unit speed and eat grains they reach; binary search the smallest time that lets every grain be eaten.

Open the interactive visualisation