done C++ implementation todo branch-bound method