Number of Subarrays With AND Value of K
For each end index, group the subarrays by their AND value; there are few distinct values, so counting stays small.
For each end index, group the subarrays by their AND value; there are few distinct values, so counting stays small.