Pagini recente » Cod sursa (job #2417937) | Diferente pentru utilizator/mathboy intre reviziile 99 si 98 | Cod sursa (job #1977995) | Cod sursa (job #3286220) | 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;
}