codejam 2013 r1c a-large, b-small, c-small