#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ int Q, t, x, S; cin >> Q; vector cnt(30); set st; while(Q){ Q--; cin >> t; if (t == 1){ cin >> x; if (st.count(x)) continue; st.insert(x); for (int i=0; i<30; i++){ if (x & (1<> x; if (!st.count(x)) continue; st.erase(x); for (int i=0; i<30; i++){ if (x & (1<