Problem 3048 · Medium

Earliest Second to Mark Indices I

Binary search the second and check with deadlines whether every decrement can happen before its index is marked.

Open the interactive visualisation