I am not able to understant the question
5
0 3
0 5
0 10
0 6
1 1 4 6
is 4 and 6 values of range
explain me with some examples
I am not able to understant the question
5
0 3
0 5
0 10
0 6
1 1 4 6
is 4 and 6 values of range
explain me with some examples
Okay so in the sample case first 4 queries are of type zero
so you insert 3,5,10,6 in your array.
Array looks like {3,5,10,6}
Next query type is 1.
So we take input L (left index of range) and R(right index of range).
After this we take input the value with whom xor is to be maximised, i,e, X, which is 6 in this case.
L=1, R=4,X=6.
Now the possible values in this range are
3,5,10,6
Now 10^6 is maximum so we print 10 as the answer to the query.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.