Hi guys! ✋

This is a data structure(TRIE) + math based problem from Codeforces Round #430.

Problem Link is here.

You are given an array $A$ of size $N$, and you have to perform $M$ operations on it.

In each operation, you are given an integer $x$, and you perform XOR operation of every element of the array with $x$. Note that the array is updated after every operation and subsequent operations are performed on modified array. At end of every operation, you need to print the mex value of the updated array.

NOTE: mex of a set $A$ is the least whole number ( $\ge 0$ ) which is not present in $A$.

Problem Link is here.

You are given an array $A$ of size $N$, and you have to perform $M$ operations on it.

In each operation, you are given an integer $x$, and you perform XOR operation of every element of the array with $x$. Note that the array is updated after every operation and subsequent operations are performed on modified array. At end of every operation, you need to print the mex value of the updated array.

NOTE: mex of a set $A$ is the least whole number ( $\ge 0$ ) which is not present in $A$.

Check out the following video where I've described the solution:

CodeForces Round 430 - Problem D Tutorial (Number Theory, Trie)

Refer the Video Description to find the links to source code and problem link.

CodeForces Round 430 - Problem D Tutorial (Number Theory, Trie)

Refer the Video Description to find the links to source code and problem link.

If you liked my efforts, please hit the like button 👍, subscribe and share the videos among your college :D

Have a good day! 😆

Have a good day! 😆

## No comments:

## Post a Comment