CEILLAND Problem Solution

Hi, I am unable to understand the solution to the CEILLAND question ( LINK : http://www.codechef.com/COOK20/problems/CIELLAND ) which was a part of the March Cook-off.

Can someone please help me understand the explanation given in the contest editorial ? ( LINK : http://www.codechef.com/wiki/march-2012-cook-problem-editorials ) Any help would be most appreciated. Thank you :slight_smile:

Hi, where can’t you understand in the editorial? Please tell me.