Google Code Jam 2014 solutions