CodeJam, Qualification Round 2013
Practise on LeetCode.