Google Codejam solutions