A doubt in approach of MAXEP problem ( Shared by IOI Gold Medalist ) - December long contest 2018

I wrote an editorial regarding how to solve the MAXEP problem asked in december long contest 2018.

A lot of users shared wonderful approaches to take on the problem (besides my way of solving it), but I was not able to understand the approach of @utaha.

So any-one who understands how @utaha solved that particular problem - Please help…!!!

Especially I would be glad if @utaha himself helps me…!!!

That approach was ( as @utaha mentioned in the editorial ) from an IOI gold medalist and sounded very simple, just the fact was that I was not able to understand why was it working…

Link to that editorial can be found HERE

I asked my doubts there in the comments section ( Just under where @utaha shared his approach), but I guess no one is looking at that editorial now… So I decided to ask it seperately here.

But if you get @utaha’s approach, Please share it in that editorial itself. ( It will be good for me to have all material of one question under one link itself)

Thanks in Advance…!!!

someone please help…!!!