Can someone give me a more detailed explanation of technique used in the solution to problem D ? Or maybe post a link where it is explained in more detail.

The exact problem is here
https://codeforces.com/contest/1019/problem/D

and also tried to understand the problem given in this editorial
https://codeforces.com/blog/entry/61161

but not able to understand. Can anyone help me to understand the solution of this problem.

Bump.
@vijju123 can you help us out here.
If possible please explain C,E as well.