SCU 2010 warmup contest 5

F: Find the Treasure