XORSUB:Unable to find error in my logic

Instead of using 2d array or gaussian elmination i used simple concept that 1^0=1 and 1^1=0 that is to *take digits such that no two have same set bits *.for including k in all possible subsets I **xored it with all the input elements of array.so that i would get all unique set bits position for each element in my maximum xor subset.
this is my solution link: https://www.codechef.com/viewsolution/18605373
however it is giving wa.pls someone help .