c++ 010 solution