Pagini recente » Cod sursa (job #2938935) | Clasament bkt | Cod sursa (job #1082010) | Cod sursa (job #450463) | Cod sursa (job #2971234)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
void solve(){
int n;
cin >> n;
set<int> s;
for(int i = 0; i < n; i++){
int t, x;
cin >> t >> x;
if(t == 1)
s.insert(x);
else if(t == 2)
s.erase(x);
else
cout << s.count(x) << '\n';
}
}
int main(){
freopen("hashuri.in", "r", stdin);
freopen("hashuri.out", "w", stdout);
ios::sync_with_stdio(0); cin.tie(0);
int t = 1;
//cin >> t;
while(t--){
solve();
}
}