add c++ solutions to problem 1