Find XOR on a segment
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The array is given. Find the value of XOR (bitwise exclusive or) on the segment.
Input
The first line contains the number of array elements.
The second line contains integers — the elements of the array .
The third line contains the number of XOR requests on the segment.
Each of the following lines contains two integers and — the boundaries of the array segment where you must find XOR.
Output
For each query, print in a separate line the XOR of elements on the corresponding segment of array (including borders).
Examples
Input #1
Answer #1
Submissions 317
Acceptance rate 32%