Cover points with roofs. Roof costs . Find minimum total cost. = min cost to cover first points. Transition: . Expand the square.
After algebra: . Lines have slope and intercept . Apply CHT. Add to the query result.
Another classic
Cover points with roofs. Roof costs . Find minimum total cost. = min cost to cover first points. Transition: . Expand the square.
After algebra: . Lines have slope and intercept . Apply CHT. Add to the query result.