Code Jam 2013 Round 1C, Problem A
Code Jam 2013 Round 1C, Problem B (small case)