Problem 3301 · Medium

Maximize the Total Height of Unique Towers

Assign heights from the highest limit down, giving each tower the lower of its limit and one less than the tower before it.

Open the interactive visualisation