This might be very naive, but still, can anyone help me by telling why the problem XORSUB can’t be solved with an intuitive subset selection recursive method like:

ll recurse(ll x, ll cur) {

if(x >= n) return cur;

return max(recurse(x+1, cur), recurse(x+1, cur^a[x]));

}

I know this problem will be solved with gaussian elem. but I can’t get it.

Thanks for anyhelp.