Solve each query in Q
for ( int i = 0 ; i < q . size ( ) ; i ++ ) { int id = q [ i ] [ 0 ] ; if ( id == 1 ) { int L = q [ i ] [ 1 ] ; int R = q [ i ] [ 2 ] ; cout << " XOR ▁ of ▁ elements ▁ " << " in ▁ given ▁ range ▁ is ▁ " << rangeXor ( BITree , L , R ) << " STRNEWLINE " ; } else { int idx = q [ i ] [ 1 ] ; int val = q [ i ] [ 2 ] ; A [ idx ] ^= val ;