Question: def AND_Queries (Arr, Val, L, N, Q, R): # Write your code here cnt = [[0]*100005]*32 for i in range(0,Q): l = L[i] r =

def AND_Queries (Arr, Val, L, N, Q, R): # Write your code here cnt = [[0]*100005]*32 for i in range(0,Q): l = L[i] r = R[i] v = Val[i] for j in range(0,30): if(not v&(1<>>>>>>>>> here i am getting both the values same although l-1 and r are different values why this is happening???? for i in range(0,len(Arr)): num = 0 for j in range(0,30): if i: cnt[i][j]+=cnt[i-1][j] if cnt[i][j]: {} else : if Arr[i]&(1<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!