Pagini recente » Cod sursa (job #128137) | Cod sursa (job #388985) | Cod sursa (job #1430210) | Cod sursa (job #241629) | Cod sursa (job #1987883)
#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <queue>
#include <climits>
#include <map>
#include <unordered_map>
#define ll long long
#define pb push_back
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
const int NLIM = 1e6 + 10;
int N;
unordered_map< int, int > m;
int main()
{
ios::sync_with_stdio( false );
fin >> N;
while( N-- )
{
int t, x;
fin >> t >> x;
if( t == 1 )
{
m[x] = 1;
}
else if( t == 2 )
{
m.erase( x );
//m[x] = 0;
}
else
{
fout << ( m.find( x ) != m.end() ) << "\n";
//fout << m[x] << "\n";
}
}
return 0;
}