Pagini recente » Cod sursa (job #2641357) | Cod sursa (job #2040023) | Cod sursa (job #2673211) | Cod sursa (job #161111) | Cod sursa (job #2571139)
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int q;
unordered_map <int, int> umap;
int main()
{
f >> q;
while(q--)
{ int type, x;
f >> type >> x;
if(type == 1) umap[x] = 1;
else if(type == 2) umap[x] = 0;
else
{ if(umap[x]) g << 1 << '\n';
else g << 0 << '\n';
}
}
return 0;
}