OR-XOR
Practice
3.8 (5 votes)
Basic programming
Problem
60% Success 2298 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code
Given an array
Here,
Print the number of total possible values of
Input format
- The first line contains
denoting the number of test cases. - The first line of each test case contains integers
, denoting the size of the array . - The next line contains
integers.
Output format
Print the number of total possible values of
Constraints
The sum of
Sample Input
1 2 1 4
Sample Output
4
Explanation
Here minimum possible bitwise OR of the array is 5.
All possible values for 'X' are 0,1,4,5.
Code Editor
Please login to use the editor
You need to be logged in to access the code editor
Submissions
Please login to view your submissions
Similar Problems
Points:30
3 votes
Tags:
ApprovedMapsMediumSetsapprovedhiringrecruit
2.AABBAAC
Points:30
17 votes
Tags:
ApprovedImplementationMediumOpenString Manipulation
Points:30
5 votes
Tags:
AlgorithmsApprovedMathMediumOpen
Editorial
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor