Pagini recente » Diferente pentru problema/troll intre reviziile 18 si 32 | Cod sursa (job #1231342) | Cod sursa (job #1516440) | Cod sursa (job #1791396) | Cod sursa (job #1047905)
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
unordered_map<int, bool> h;
int t, x, n, i;
int main()
{
cin>>n;
for(i=1; i<=n; i++)
{
cin>>t>>x;
if(t==1) h[x]=1;
else
if(t==2) h.erase(x);
else
if(t==3) cout<<(h.find(x)!=h.end())<<'\n';
}
return 0;
}