Pagini recente » Cod sursa (job #1345210) | Cod sursa (job #1912261) | Cod sursa (job #2271467) | Cod sursa (job #392971) | Cod sursa (job #3213362)
#include <bits/stdc++.h>
using namespace std;
ifstream in("hashuri.in");
ofstream out("hashuri.out");
#define pii pair<int, int>
#define pb push_back
#define fi first
#define se second
const int NMAX = 1e6 + 30;
const int INF = 0x3f3f3f3f;
int n, op, x;
unordered_map<int, bool> hm;
void read()
{
in >> n;
}
void solve()
{
while (n--)
{
in>>op>>x;
if (op==1) hm[x] = 1;
else if (op==2) hm[x] = 0;
else hm[x]==1 ? out<<1<<'\n' : out<<0<<'\n';
}
}
int main()
{
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(false);
read();
solve();
return 0;
}