Problem 768 · Hard
A monotonic stack of chunk maxima merges whenever a smaller value arrives.
Open the interactive visualisation