Cod sursa(job #479699)
Utilizator | Data | 24 august 2010 21:38:00 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.4 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;
}