GCJ: 2012-1A-B-Kingdom Rush. Greedy Algorithm.