Problem 1765 · Medium
Assign maximum possible terrain heights with water at zero and neighboring differences at most one.
Open the interactive visualisation