Pagini recente » Cod sursa (job #1440585) | tema_lee | Cod sursa (job #2977263) | Cod sursa (job #2921241) | Cod sursa (job #2933208)
#include <bits/stdc++.h>
using namespace std;
map<long long, int>m;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
void ins(int x)
{
m[x] = 1;
}
void ers(int x)
{
m[x] = 0;
}
void ct(int x)
{
fout << m[x] << '\n';
}
int main()
{
int nrop, op, x;
fin >> nrop;
for(int j = 1; j <= nrop; ++ j)
{
fin >> op >> x;
if(op == 1)
ins(x);
else if(op == 2)
ers(x);
else
ct(x);
}
return 0;
}