Problem 1765 · Medium

Map of Highest Peak

Assign maximum possible terrain heights with water at zero and neighboring differences at most one.

Open the interactive visualisation