Problem 1803 · Hard

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.

Open the interactive visualisation