Google Code Jam 2013 - my personal solutions