all the solutions in c++