#include #include using namespace std; #define endl "\n" #define i64 long long const int N=2e5+10; void solved(){ int n; cin>>n; //cout<> a(100,vector(n+3)); vector d(n+1); for(int i=1;i<=n;i++){ i64 x; cin>>x; d[i]=x; for(int j=0;j<=59;j++){ if((x>>j)&1) a[j+1][i]=1; } } //for(int j=0;j<=59;j++) a[n+1][j]=0; auto cluct=[&](int n){ for(int i=1;i<=n;i++){ int max=i; for(int j=i+1;j<=60;j++){ if(fabs(a[j][i])>fabs(a[max][i])) max=j; } for(int j=1;j<=n+1;j++) { swap(a[max][j],a[i][j]); //swap(d[max],d[i]); } if(a[i][i]==0){ vector ans; for(int j=i;j>=1;j--){ if(a[j][i]==1){ ans.push_back(j); } } /* cout<<";;;"<=61) cluct(61); else cluct(n); } signed main(){ //ios::sync_with_stdio(false); //cin.tie(0); //cout.tie(0); int t=1; //cin>>t; while(t--) solved(); }