A problem that appeared in the Facebook Hacker Cup 2013 Hackathon.