You are given an array of size . Your task is to find the number of subarrays within the given array such that the Bitwise XOR of all elements in the subarray has an odd number of set bits (i.e., 1s).
The subarray of is a contiguous part of the array , i. e. the array for some .
Input format
Output format
For each test case, print the number of subarrays within the given array such that the Bitwise XOR of all elements in the subarray has an odd number of set bits (i.e., 1s) in a new line.
Constraints
For test case :
In the given array there are the following 4 subarrays with their XOR having odd number of set bits:
Thus, the answer is 4.