Cod sursa(job #2415257)
| Utilizator | Data | 25 aprilie 2019 17:51:29 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.36 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f ( "hashuri.in" ); ofstream g ( "hashuri.out" );
map< int , int > H;
int main()
{ int n,tip,x,nr=0;
f>>n;
while(n--)
{ f>>tip>>x;
if(tip==1 and H.find(x)==H.end()) H[x]=++nr;
if(tip==2) H.erase(x);
if(tip==3) g<<H.find(x)!=H.end()<<'\n';
}
return 0;
}
