Song Zha Zha has an -indexed array . Li Zha Zha has queries. Each query has two integers , , asking Ran Zha Zha to do the following thing: First, find all subintervals of . Then calculate their XOR sum. For example:
, , .
All subintervals of are . Their XOR sum is .
XOR means exclusive or (^ in C++ or Java).
输入格式
The input contains multiple test cases.
First line contains an integer , which is the number of test cases.
In each test case:
The first line contains two integers , . . is the length of the array .
Then one line contains integers indicating . .
Then lines follow. Each line has two integers , meaning that there’s a query . .