My code in Google Code Jam 2014