A bitwise OR takes two equal-length binary representations and performs the logical OR operation on each pair of the corresponding bits. The result in each position is $0$ if both bits are $0$, while otherwise, the result is $1$. The bitwise OR operation is represented in this problem, and also in programming languages such as C++ and Java, using the operator "_|_".
To get the value of $x thin | thin y$, consider both numbers in the binary representation (padded with zeros to make their lengths equal), then apply the OR operation on the corresponding bits, and return the result into decimal form. For example, the result of $10 thin | thin 17$ = $01010 thin | thin 10001$ = $11011$ = $27$.
You are given an array $a$ of $n$ integers. A subarray of the array $a$ is a sequence $a_l, a_{l + 1}, \\\\cdots, a_r$ for some integers ($l, thin r$) such that $1 <= l <= r <= n$.
The subarray OR is defined as the the bitwise OR of all elements inside that subarray. Formally, the subarray OR of the subarray ($l, thin r$) is $a_l thin | thin a_{l + 1} thin | thin \\\\cdots thin | thin a_r$.
Your task is to find the subarrays OR values of all subarrays in the given array and return the number of *unique* values among them. Can you?
The first line contains an integer $T$ ($1 <= T <= 5$) specifying the number of test cases.
The first line of each test case contains an integer $n$ ($1 <= n <= 10^5$) giving the size of an array $a$. Then a line follows contains $n$ integers $a_1, \\\\cdots, a_n$ ($0 <= a_i <= 10^9$), giving the array $a$.
For each test case, print a single line containing the number of *unique* subarrays OR values among the subarray OR values of all subarrays in the given array.
In the first test case, there are $6$ subarrays in the given array $a$. The subarray OR of these subarrays is calculated as follows:
So, the number of *unique* values among all subarrays is $3$.
## Input
The first line contains an integer $T$ ($1 <= T <= 5$) specifying the number of test cases.The first line of each test case contains an integer $n$ ($1 <= n <= 10^5$) giving the size of an array $a$. Then a line follows contains $n$ integers $a_1, \\\\cdots, a_n$ ($0 <= a_i <= 10^9$), giving the array $a$.
## Output
For each test case, print a single line containing the number of *unique* subarrays OR values among the subarray OR values of all subarrays in the given array.
[samples]
## Note
In the first test case, there are $6$ subarrays in the given array $a$. The subarray OR of these subarrays is calculated as follows: ($1, thin 1$) $arrow.r$ $1$. ($1, thin 2$) $arrow.r$ $1 thin | thin 2 = 3$. ($1, thin 3$) $arrow.r$ $1 thin | thin 2 thin | 3 = 3$. ($2, thin 2$) $arrow.r$ $2$. ($2, thin 3$) $arrow.r$ $2 thin | thin 3 = 3$. ($3, thin 3$) $arrow.r$ $3$. So, the number of *unique* values among all subarrays is $3$.
**Definitions**
Let $ T \in \mathbb{Z} $ be the number of test cases.
For each test case $ k \in \{1, \dots, T\} $:
- Let $ n_k \in \mathbb{Z} $ denote the length of the array.
- Let $ A_k = (a_{k,1}, a_{k,2}, \dots, a_{k,n_k}) $ be a sequence of non-negative integers, where $ 0 \le a_{k,i} \le 10^9 $.
**Constraints**
1. $ 1 \le T \le 5 $
2. For each $ k \in \{1, \dots, T\} $:
- $ 1 \le n_k \le 10^5 $
- $ 0 \le a_{k,i} \le 10^9 $ for all $ i \in \{1, \dots, n_k\} $
**Objective**
For each test case $ k $, compute the set:
$$
S_k = \left\{ \bigvee_{i=l}^{r} a_{k,i} \;\middle|\; 1 \le l \le r \le n_k \right\}
$$
where $ \bigvee $ denotes the bitwise OR operation.
Output $ |S_k| $, the number of unique values in $ S_k $.