Pagini recente » Cod sursa (job #2300576) | Cod sursa (job #1950449) | Cod sursa (job #1092510) | Cod sursa (job #266125) | Cod sursa (job #391902)
Cod sursa(job #391902)
#include <fstream>
#include <ext/hash_map>
using namespace std;
using namespace __gnu_cxx;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
int T;
hash_map <int, int> H;
int main()
{
for(fin >> T; T; --T)
{
int op, nr;
fin >> op >> nr;
if(op == 1) H[nr] = 1;
if(op == 2) H.erase(nr);
if(op == 3) fout << (H.find(nr) != H.end()) << "\n";
}
}