Problem 4026 · Medium

Maximum Gap Between Stations

Place each worker as early as possible from the left and as late as possible from the right; the widest valid pair of consecutive workers gives the answer.

Open the interactive visualisation