Cod sursa(job #3203808)
Utilizator | Data | 14 februarie 2024 18:09:30 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.4 kb |
#include <bits/stdc++.h>
using namespace std;
#define int long long
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int nr;
int32_t main()
{ unordered_map <int , int > mp;
int n ,i,x;
f>>n;
for(int j=1;j<=n;j++)
{
f>>i>>x;
if(i==1 && mp.find(x)==mp.end())
mp[x]=1;
if(i==2)
mp.erase(x);
if(i==3)
g<<(mp.find(x)!=mp.end())<<'\n';
}
return 0;
}