Google Code Jam 2013 Qualification Round
Problem D. Treasure
small