done more codeeval in C++