c++: add knapsack solver lib