#ifdef NACHIA #define _GLIBCXX_DEBUG #else // disable assert #define NDEBUG #endif #include #include #include #include #include using namespace std; using ll = long long; const ll INF = 1ll << 60; #define REP(i,n) for(ll i=0; i using V = vector; template void chmax(A& l, const B& r){ if(l < r) l = r; } template void chmin(A& l, const B& r){ if(r < l) l = r; } using u64 = unsigned long long; u64 a[1<<24] = {}; void testcase(){ ll N; cin >> N; REP(i,N){ ll x; cin >> x; a[x/64] |= 1ull << (x % 64); } for(int b=1; b<64; b*=2){ u64 m = ~u64(0) / ((u64(1) << b) + 1); for(auto& x : a) x |= x >> b & m; } REP(b,24) REP(i,1<<24) if(!(i&1<sync_with_stdio(0); testcase(); return 0; }