Number Game on a Tree

  • + 2 comments

    someone pls explain: why it's necessary to compress the weights and then take 2^(x)%mod as done in editorial. even without doing that, xor sum will be 0 for all even occurences.