Pagini recente » Diferente pentru problema/minim2 intre reviziile 17 si 16 | Cod sursa (job #1322658) | Cod sursa (job #1627875) | Cod sursa (job #1944427) | Cod sursa (job #1037950)
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n, x;
int t;
unordered_map<int, int> m;
int main()
{
f>>n;
while(n--){
f>>t>>x;
if(t==1) m[x]=1;
if(t==2) m.erase(x);
if(t==3)
if(m[x]) g<<1<<'\n';
else g<<0<<'\n';
}
return 0;
}