Problem 3296 · Medium

Minimum Number of Seconds to Make Mountain Height Zero

Binary search the total time and let each worker remove as many layers as that time allows.

Open the interactive visualisation