All Tracks Problem

Monica , Joey and the Date punishment
Tag(s):

Easy

Problem
Editorial
Analytics

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:

\( 1 \leq T \leq 10 \)

\( 1 \leq N \leq 20 \)

\( 1 \leq A[i],L \leq 100 \)

Problem Setter - Satyarth

SAMPLE INPUT
1
4
1 2 3 4
3
SAMPLE OUTPUT
8
Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: Bash, C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Swift-4.1, TypeScript, Visual Basic

CODE EDITOR

Initializing Code Editor...
Your Rating:
Notifications
View All Notifications

?