Facing problem in Maximu Xor permutation [DP master course]

IDE link:

I am getting WA can you point out any bug , or share a working code?

Hey @utkarsh.lal9430310535
Refer to this : https://ide.codingblocks.com/s/349794