try to solve cpp problem?