Let's decode what each query asks as subsets:
means every bit of is also in . So is a subset of . Count subsets of in the array.
means every bit of is also in . So is a subset of , meaning is a superset of . Count supersets of .
means and share at least one bit. The complement: means is a subset of (the bitwise complement). So count minus subsets of .