Pagini recente » Cod sursa (job #1544066) | Cod sursa (job #2375161) | Cod sursa (job #57003) | Cod sursa (job #865373) | Cod sursa (job #2439529)
#include <bits/stdc++.h>
#define cin fi
#define cout fo
using namespace std;
ifstream fi("hashuri.in");
ofstream fo("hashuri.out");
const int MOD = 10000019;
int n;
bool h[MOD - 1];
inline int key(int x)
{
return x - x / MOD * MOD;
}
int main()
{
cin >> n;
for (int i = 1; i <= n; i++)
{
int op, x;
cin >> op >> x;
if (op == 1)
h[key(x)] = 1;
else if (op == 2)
h[key(x)] = 0;
else
cout << h[key(x)] << "\n";
}
return 0;
}