Help needed in Chef and Queries

I was trying to solve Contest Page | CodeChef
problem using BIT .
But I am getting WA

can anyone tell me the mistake ??

https://www.codechef.com/viewsolution/51908322

Here’s an entirely random testcase on which your solution fails:

1 3                       
0
1 1 1 5
1 1 1 6
2 1

2 Likes

Thx Bro got the error .

1 Like