Problem 1846 · Medium
Maximize the final value after decreases and rearrangement under adjacent-gap constraints.
Open the interactive visualisation