Codejam 2014 r1b A, B