There will be five tasks and two hours for you to solve them. Top-10 contestants on the leaderboard will receive awesome HackerRank T-shirts! (I'm really jealous, since I don't have one)
I'd like to thank wanbo for his invaluable help and testing all the problems, danilka.pro for testing one of the problems and his cool proof of author's solution, Zlobober for his help in estimation of one of the tasks difficulty, and sankear, he did nice job sitting in the bar with me and discussing the problems.
I hope you will enjoy the tasks. Please read all of the problem statements during contest, as it may be essential for your final place.
UPD. The contest has ended. Special congratulations to Lewin: the only contestant who solved the last task!