Problem 2656 · Easy
Greedy: always take the current maximum, then increment it for the next operation.
Open the interactive visualisation