Code used in the first round of the 2013 Facebook hacker cup.