Query Bits- No accepting

My solution passes the sample test case, but still gives wrong answer. I don’t get why,
I have used Lazy Propagation to solve it.
Please have a check.

https://ide.codingblocks.com/s/301222 in this also added the MOD, still not working.

Post the question also, so that I can help you


It is Query Bits under the Segment Trees Problems.

Explanation

Initially the integer in binary is β€œ000”. After first query, it becomes, 110(=6). Answer to next query comes out to be 6, i.e. β€œ110” in decimal. After 3rd query, it becomes β€œ100”. Answer to 4th query is 0,i.e. decimal of β€œ0”. After 5th query, it becomes, β€œ101” and thus answer to the last query comes out to be 5, i.e. β€œ101” i decimal.

show me how you formed the tree in your approach. You can attach a pic in your answer