max_work = min(v1.max_work(), v2.max_work());
max_work = std::min(v1.max_work(), v2.max_work());
HeuristicValue min(const HeuristicValue& v1, const HeuristicValue& v2) {  int max_cost, max_work, add_cost, add_work;  if (v1.max_cost() == v2.max_cost()) {    max_cost = v1.max_cost();    max_work = min(v1.max_work(), v2.max_work());  } else if (v1.max_cost() < v2.max_cost()) {    max_cost = v1.max_cost();    max_work = v1.max_work();  } else {    max_cost = v2.max_cost();    max_work = v2.max_work();  }  if (v1.add_cost() == v2.add_cost()) {    add_cost = v1.add_cost();    add_work = min(v1.add_work(), v2.add_work());  } else if (v1.add_cost() < v2.add_cost()) {    add_cost = v1.add_cost();    add_work = v1.add_work();  } else {    add_cost = v2.add_cost();    add_work = v2.add_work();  }  return HeuristicValue(max_cost, max_work, add_cost, add_work);}