Problems from Google Code Jam 2008 EMEA Semifinal