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.
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.