Can someone give me insight of this problem .... http://codeforces.com/problemset/problem/724/C .
I can't understand from editorial or any of the comments.Thanks in advance.