Problem 2742 · Hard

Painting the Walls

Each paid wall covers its time plus one walls for free, so a knapsack over covered counts finds the cheapest set that covers all walls.

Open the interactive visualisation