Count subsets having distinct even numbers
Easy Accuracy: 28.87% Submissions: 971 Points: 2

Given a set of n numbers. The task is to count all the subsets of the given set which only have even numbers and all are distinct.
Note: By the property of sets, if two subsets have the same set of elements then they are considered as one. For example: [2, 4, 8] and [4, 2, 8] are considered to be the same.

Input:
First line consists of T test cases. First line of every test case consists of N, denotes the element in an array. Second line consists of elements in Array.

Output:
Print the Count of possible subsets. 

Constraints:
1<=T<=100
1<=N<=1000
1<=Ai<=1000 (All numbers that fit in 64-bit)

Example:
Input:

1
8
4 2 1 9 2 6 5 3
Output:
7

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.