Query Bits Problem

I am getting TLE. How can i optimize it?
My Solution Link–https://ide.codingblocks.com/s/66395

Hi

You need to use lazy propagation for range update, this will optimize your code.

Use Lazy Propagation.

Hit Like if you get it!. :smiley:
Cheers! :stuck_out_tongue:

I am not able to develop the logic for lazy propagation in spite of the fact that i watched lazy Propagation video quite a few times (Prateek Bhaiya’s video for Minimum range query).
Help me with the logic.