Pagini recente » Cod sursa (job #2508494) | Cod sursa (job #688887) | Cod sursa (job #410994) | Borderou de evaluare (job #948696) | Cod sursa (job #2708556)
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
//#define int long long
const int Max = 1e5 + 1;
void nos()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
int n;
unordered_set < int > who;
void read()
{
f>>n;
}
void solve()
{
int i;
for(i=1;i<=n;i++)
{
int task;
int element;
f>>task>>element;
if(task == 1)
who.insert(element);
if(task == 2)
who.erase(element);
if(task == 3)
{
g<<(who.find(element)!=who.end())<<'\n';
}
}
}
void restart()
{
}
int32_t main()
{
nos();
read();
solve();
restart();
return 0;
}