Sponsored
Use these hints if you're stuck. Try solving on your own first.
What is the result of x ^ y ^ x ?
Compute the prefix sum for XOR.
Process the queries with the prefix sum values.
Solve with full IDE support and test cases