Pagini recente » Cod sursa (job #3205175) | Cod sursa (job #2502887) | Cod sursa (job #2355747) | Cod sursa (job #1715379) | Cod sursa (job #3289178)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
signed main()
{
ios_base::sync_with_stdio(false);
fin.tie(nullptr);
unordered_set<int> ap;
int n;
fin >> n;
while(n--)
{
int op, x;
fin >> op >> x;
if(op == 1)
ap.insert(x);
else if(op == 2)
ap.erase(x);
else
fout << ap.count(x) << '\n';
}
return 0;
}