google code jam 2013 1C 2nd problem