My answers for the Google Codejam 2014 qualification round