#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using R = double; using Data = pair < ll, vector >; templateusing min_priority_queue = priority_queue, greater>; const ll MOD = 1e9 + 7; const ll inf = 1LL << 60; struct edge { ll from; ll to; ll cost; }; typedef pairpll; #define all(x) (x).begin(),(x).end() #define rep(i,m,n) for(ll i = m;i < n;++i) #define pb push_back #define fore(i,a) for(auto &i:a) #define rrep(i,m,n) for(ll i = m;i >= n;--i) #define INF INT_MAX/2 vectorv; setst; int N; ll calc(ll d, vectorli) { if (li.size() <= 1)return 0; vectorw[2]; rep(i, 0, li.size()) { ll x = li[i]; if (x & (1 << d)) { w[1].pb(x^(1LL<> N; rep(i, 0, N) { ll x; cin >> x; st.insert(x); } fore(x, st)v.pb(x); cout << calc(35,v) << endl; return 0; }