Google Code Jam 2014 R1C
Problem A
Google Code Jam 2014 R1C
Problem B