Update problem.cpp

heuristic updated