#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>j)&1){ if((t>>j)&1){ now ^= base[i]; S += '1'; } else{ S += '0'; } break; } } } 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>=1;i--){ long long t = now&a[i]; for(int j=59;j>=0;j--){ if((t>>j)&1){ base.push_back(t); 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