Count Pairs With XOR in a Range
Count pairs with xor below a limit by walking a trie of earlier values, then subtract the count below low from the count below high plus one.
Count pairs with xor below a limit by walking a trie of earlier values, then subtract the count below low from the count below high plus one.