september challange



Can someone help me understand this question i dont understand what exactly we need to do this in this question.

  1. bitwise-xor sum of all the values
  2. For Q values of Δ, Weasel wants to compute XΔ0.

    link to the question here


Basically, you are given a tree. The X_d for some node d is (xor of values of all of its children)^(Node d's value).

You are given values of all nodes for day 0. Day 1’s value will be calculated by procedure above using day 0’s value. Then similarly for day 2 using day 1’s values and so on.

For a given value of day , tell value of Node 0 on that day.


thanks @vijju123 crystal clear explanation!!