C++: Google Code Jam Starting Template