Solutions to problems appeared in facebook hacker cup 2013