Solve each query in Q
for ( int i = 0 ; i < q . GetLength ( 0 ) ; i ++ ) { int id = q [ i , 0 ] ; if ( id == 1 ) { int L = q [ i , 1 ] ; int R = q [ i , 2 ] ; Console . Write ( " 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 ;