Can anyone of you please provide some better explanation of http://codeforces.me/contest/449/problem/D than the explanation given in the editorial (http://codeforces.me/blog/entry/13112). I am new to such stuff so I am not good at grasping the concepts as other smart people are.