这是一道板子题
#include<iostream>
#include<cstdio>
#include<cstring>
#define ll long long
using namespace std;
ll p[100];
ll ans;
ll x;
ll n;
void deal(){
for(int i=62;i>=0;--i){
if(!(x>>(ll)i)){
continue;
}
if(p[i]){
x^=p[i];
}else{
p[i]=x;
return ;
}
}
}
int main(){
scanf("%lld",&n);
for(int i=1;i<=n;++i){
scanf("%lld",&x);
deal();
}
for(int i=62;i>=0;--i){
if((ans^p[i])>ans)
ans^=p[i];
}
cout<<ans;
return 0;
}