Cod sursa(job #922840)

Utilizator vld7Campeanu Vlad vld7 Data 22 martie 2013 17:59:36
Problema Hashuri Scor 100
Compilator cpp Status done
Runda Arhiva educationala Marime 0.5 kb
#include <hash_set>
#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;
}