My Google Code Jam in C++