Google Code Jam 2013 R1B
Problem B. Falling Diamonds