Learning Lazy Propagation using MAXBTY

So I was trying to learn Lazy Propagation in a a segment tree and the first question I tried it on was MAXBTY (COOK116B).

It keeps getting WA and I have no idea why. Can somebody please help where am I missing? Thanks.

Solution : https://www.codechef.com/viewsolution/30716889