Monica , Joey and the Date punishment

0

0 votes
Easy
Problem

Monica, Joey and the Date punishment

enter image description here

This time the quarrel is between Joey and Monica, and the the quarrel is rather unique in itself. Both had decided to bring each other a date for Saturday night, but Joey, due to his carelessness forgot and therefore Monica was alone , again.

Now Monica is angry with Joey and decides to punish him. But after looking at Joey's cute face, she decides to give him a final chance. She gave him a set a numbers A[i] , and now she wants Joey to find out how many subsets of the following set have xor value less than or equal to her Lucky Number L.

But Joey is unfortunately dumb and therefore seeks your help. You should do this problem quickly, before Monica finds out that Joey is bailing on the problem.

Input:

T - No of test cases
N - No of elements in array
A line containing N space seperated integers A[i]
L - Her lucky number

Output:

The answer of the query as stated in the problem.

Constraints:

1T10

1N20

1A[i],L100

Problem Setter - Satyarth

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?