Need help with this problem
How to solve this problem ?http://codeforces.me/contest/205/problem/B
Thanks.