"When talking about XOR of a subsegment, it's usually useful to think about prefix XORs. Then, if bi=a1⊕a2⊕…⊕ai is the array or prefix XORs, the subsegment XOR f is simply f(x,y)=by⊕bx−1 . That means, for f(l,r) to be zero, bl−1 has to be equal to br , while all other values of b should be distinct. The easiest construction is then bi=i , with the exception that br=l−1 . The array a can be then reconstructed as ai=bi⊕bi−1 ."
Yeah, I can help. Read this:
"When talking about XOR of a subsegment, it's usually useful to think about prefix XORs. Then, if bi=a1⊕a2⊕…⊕ai is the array or prefix XORs, the subsegment XOR f is simply f(x,y)=by⊕bx−1 . That means, for f(l,r) to be zero, bl−1 has to be equal to br , while all other values of b should be distinct. The easiest construction is then bi=i , with the exception that br=l−1 . The array a can be then reconstructed as ai=bi⊕bi−1 ."