Template Function ADS::paintHouses
Defined in File HouseProblems.h
Function Documentation
-
template<class T>
std::pair<T, std::vector<std::size_t>> ADS::paintHouses(const std::vector<std::vector<T>> &cost) the least cost of a painting of the houses, adjacent houses of different colors, cost[ h ][ c ] for the house h of the color c, and the colors
- Pre:
the rows of the same size k, k >= 2 if there are two rows or more, k >= 1 if one
- Post:
adjacent colors differ and give the cost found