Pagini recente » Cod sursa (job #1888009) | Cod sursa (job #759890) | Clasament simulareoji_2004_11-12 | Cod sursa (job #995540) | Cod sursa (job #1040890)
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
unordered_map<int, int> h;
int t, x, n, i;
int main()
{
cin>>n;
for(i=1; i<=n; i++)
{
cin>>t>>x;
if(t==1 && h.find(x)==h.end()) h[x]=1;
else
if(t==2 && h.find(x)!=h.end()) h.erase(x);
else
if(t==3) cout<<(h.find(x)!=h.end())<<'\n';
}
return 0;
}