Pagini recente » Cod sursa (job #1440182) | Cod sursa (job #3130773) | Cod sursa (job #951335) | Cod sursa (job #2863806) | Cod sursa (job #1987877)
#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, bool > m;
int main()
{
fin >> N;
while( N-- )
{
int t, x;
fin >> t >> x;
if( t == 1 )
{
m[x] = 1;
}
else if( t == 2 )
{
m[x] = 0;
}
else
{
fout << m[x] << "\n";
}
}
return 0;
}