codejam2011-qualification first problem