I write virtual contest-Round 141 and find this interesting problem. http://codeforces.me/contest/228/problem/C
can someone explain it a bit more and gives me clear implementation,in editorial there is no comments and a few people have solved it.thanks