Problem 1246 · Hard
Fill a table of cheapest clearing costs for every range, pairing equal ends after the middle is removed.
Open the interactive visualisation