#include using namespace std; typedef unsigned int ui; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) int A[100100]; int main(){ int N; cin >> N; int maxv = 0; REP(i,N){ cin >> A[i]; maxv = max(maxv, A[i]); } int s = 0; for(int i = 30; i >= 0; i--){ int v = 0; int mask = s | 1<