RRPLAYER problem in understanding

I am not able to understand this problem. /nor the solution proposed here
http://discuss.codechef.com/questions/59370/rrplayer-editorial?page=1#65298