#include #include using namespace std; using ll=long long; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} int f(int d,int N,vector&A){ if(d<0)return 0; vectorB,C; rep(i,N){ if(A[i]>>d&1){ B.push_back(A[i]); }else{ C.push_back(A[i]); } } if(B.empty())return f(d-1,(int)C.size(),C); else if(C.empty())return f(d-1,(int)B.size(),B); else return (1<>N; vectorA(N); rep(i,N)cin>>A[i]; cout<