#P4462. [CQOI2018] 异或序列
[CQOI2018] 异或序列
Description
Given an integer sequence of length , for a query with parameters , ask how many subarrays within have xor-sum equal to . That is, among all such that , how many pairs satisfy .
Input Format
The first line contains three integers .
The second line contains integers separated by spaces, namely .
Each of the next lines contains two integers and , representing one query.
Output Format
Output lines, each corresponding to the answer for one query.
4 5 1
1 2 3 1
1 4
1 3
2 3
2 4
4 4
4
2
1
2
1
Hint
For of the testdata, .
For of the testdata, , , .
Translated by ChatGPT 5
京公网安备 11011102002149号