Cod sursa(job #922839)
| Utilizator | Data | 22 martie 2013 17:59:11 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.5 kb |
#include <hash_set.h>
#include <fstream>
/*
*
*/
using namespace std;
using namespace __gnu_cxx;
hash_set< int, hash<int> > v;
int main()
{int n, x, y;
ifstream in("hashuri.in");
ofstream out("hashuri.out");
in>>n;
for( ; n; --n )
{
in>>x>>y;
switch( x )
{
case 1: v.insert(y); break;
case 2: v.erase(y); break;
case 3: out<<( v.end() != v.find(y))<<'\n'; break;
}
}
return 0;
} 