My solutions to Facebook Hacker Cup 2013 problems (Round 0,1)