Can someone give me insight of this problem .... http://codeforces.me/problemset/problem/724/C .
I can't understand from editorial or any of the comments.Thanks in advance.
Mock ICPC Prelims Contest 1 Solution Discussion