Zero Xor
Practice
5 (4 votes)
Algorithms
Arrays
Binary search
Medium
Meet in the middle
Searching
Problem
76% Success 5898 Attempts 30 Points 5s Time Limit 256MB Memory 1024 KB Max Code
A Zero Xor Subset is a non-empty subset having Xor of all the elements in it equal to 0.
Now you are given an array of N numbers.
You have to count the number of different Zero Xor Subsets of this array.
Input:
First line contains a number N
N is the length of the array.
Second line contains the N elements of the array.
Output:
Single number denoting the Count of Zero Xor Subsets of the given array.
Input Constraints:
1<=N<=40
1<=a[i]<=1018
Hint:
Meet in the middle
Submissions
Please login to view your submissions
Similar Problems
Points:30
88 votes
Tags:
ApprovedBinary SearchMediumOpenSorting
Points:30
6 votes
Tags:
ApprovedBinary SearchMathMediumOpenSorting
Points:30
24 votes
Tags:
AlgorithmsApprovedData StructuresMediumOpenSorting
Editorial