Pagini recente » Diferente pentru problema/progr intre reviziile 22 si 21 | Cod sursa (job #1384395) | Cod sursa (job #1032143) | Diferente pentru problema/halftree intre reviziile 17 si 18 | 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;
}