Pagini recente » Cod sursa (job #2983067) | Cod sursa (job #1323047) | Cod sursa (job #812776) | Cod sursa (job #1637950) | Cod sursa (job #2048212)
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n;
unordered_map <int, bool> m;
int main()
{
ios::sync_with_stdio(false);
fin >> n;
while(n--)
{
int v, x;
fin >> v >> x;
if(v == 1)
m[x] = 1;
else if(v == 2)
m.erase(x);///m[x] = 0;
else
fout << (m.find(x) != m.end()) << "\n";///fout << m[x];
}
return 0;
}