Adding solutions in Facebook Hacker Cup 2014 Qualification Round.