#include using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 1000000000 int check(vector> &base,long long t,char last){ long long now = 0LL; string S = "1"; for(int i=0;i>base[i].second)&1){ now ^= base[i].first; S += '1'; } else{ S += '0'; } } if(now!=t)return 100; int ret = 0; S += last; for(int i=1;i>N; vector a(N); for(int i=0;i> base; for(int i=N-1;i>=0;i--){ long long t = now&a[i]; for(int j=59;j>=0;j--){ if((t>>j)&1){ base.emplace_back(t,j); break; } } now &= a[i]^X; } reverse(base.begin(),base.end()); long long t = now&a[0]; int Q; cin>>Q; for(int i=0;i