{ ll n,r=0,*v; rd(n); walloc1d(&v,n); rd(v(n)); sort(v,v+n); do{ ll s=0; rep(i,n/2)s+=v[i]^v[i+n/2]; r=max(s,r); reverse(v+n/2,v+n); }while(next_permutation(v,v+n)); wt(r); }