I want to know why my solution to xormin using trie and segment-tree is not get accepted ?

# Need help with XORMIN?

**l_returns**#2

Because number of queries are too many and O(N*log(n)*20 + Q*log(n)*20) won’t pass in 2 secs.

Try reducing it to O(N*log(n)*20 + Q*20)

**l_returns**#4

Persistent trie

different root for each node on given tree…

You don’t need segment tree…

**sassy_cat**#6

After thinking a lot, I exactly thought of a solution with persistent tries. But it kept giving me RE.

Then I thought to try a brute force but then it also gave me RE and then WA. I still could not find out the mistake in my brute force solution. I request you to look into it once.

https://www.codechef.com/viewsolution/24019892

Thanks in advance…