Problem 3590 · Hard

Kth Smallest Path XOR Sum

Each node stores the XOR of its root path, then the k-th smallest distinct value in a subtree is read from the sorted set of those values.

Open the interactive visualisation