Solutions for Google Code Jam puzzles