codeeval 112, 38/39 in C++