Zero XOR

1

1 votes
Binary search algorithm, Medium, Algorithms, Algorithms, Meet in the Middle, Binary Search, Arrays, Searching, Searching algorithm
Problem

A zero XOR subset is a non-empty subset that contains XOR of all the elements in it that is equal to . You are given an array of numbers.
You are required to determine the number of different zero XOR subsets of this array.

Input format

  • First line: A number  denoting the length of the array
  • Second line: elements of the array

Output format
Print the single number denoting the count of zero XOR subsets of the given array.

Constraints

Sample Input
3
1 2 3
Sample Output
1
Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

For [1, 2, 3] ,there is only 1 subset (1, 2, 3) having Xor (1 ^ 2 ^3) = 0.
So, the answer is 1.

Contributers:
Editor Image

?