| Brother & Sisters! | 
 i
i N. But their youngest sister Tamanna is not happy with this. She
adds another condition that for a given sequence, Taman has to answer Q queries instead of
just one. Can you help poor Taman?
N. But their youngest sister Tamanna is not happy with this. She
adds another condition that for a given sequence, Taman has to answer Q queries instead of
just one. Can you help poor Taman?
Note:
Expression 
x AND y means applying the operation of bitwise AND to numbers x and y. This
operation exists in all modern programming languages, for example, in language C++ and
Java it is marked as "&".
 5. Then T test cases follow.
First line of each test case contains two integers N (
1
5. Then T test cases follow.
First line of each test case contains two integers N (
1 N
N 100000) and Q (
1
100000) and Q (
1 Q
Q 30000)
separated by a single space. Next line contains N integers 
x1, x2,..., xn separated by a single
space (
0
30000)
separated by a single space. Next line contains N integers 
x1, x2,..., xn separated by a single
space (
0 xi < 109). Each of next Q lines describes a query which consists of a single integer
a (
0
xi < 109). Each of next Q lines describes a query which consists of a single integer
a (
0 a < 230).
a < 230).
 i
i N.
N.
1 3 3 1 2 3 10 11 12
2 3 0
Problem Setter: Muhammed Hedayet 
Alternate Solution: Kazi Rakibul Hossain