XOR and Favorite Number
time limit per test 4 seconds
memory limit per test 256 megabytes
Bob has a favorite number k and ai of length n. Now he asks you to answer m queries. Each query is given by a pair li and ri and asks you to count the number of pairs of inte