Question not clear

what is L,R in the question , and , how in the sample output 10 is in the range of 1 , 4

sample input :-
5
0 3
0 5
0 10
0 6
1 1 4 6

sample output :-
10

pls give some more examples to clear the question and tell , what is L,R and what is Y , which we need to print ?

Hey @Himanshu-Jhawar-2273952536067590
4
0 3
0 5
0 6
1 1 3 6
simple output : 3
4 is the no of queries
For the first query , which is 0 type . You’ve to insert 3… So array is 3
For the next three queries… you’ve to add 5, 6… so array becomes 3,5,6
So last query…1 1 3 6
L = 1, R = 3, and x is 6
So you’ve to find a number from index 1 to 3 whose xor with x is maximum.
So for index 1 , xor 6 with 3
Index 2, xor 6 with 5
Index 3, xor 6 with 6
Maximum of all these xor will be the ans