Google Code Jam solutions