Pagini recente » Cod sursa (job #1648658) | Cod sursa (job #1705920) | Cod sursa (job #2647878) | Borderou de evaluare (job #2172739) | Cod sursa (job #2715842)
#include <bits/stdc++.h>
#include <unordered_set>
#define N 50001
#define pb push_back
#define INF 1<<30
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
unordered_set <int> m;
int n,c,x;
int main()
{
f>>n;
while(n--)
{
f>>c>>x;
if(c==1)
m.insert(x);
if(c==2)
m.erase(x);
if(c==3)
g<<m.count(x)<<"\n";
}
return 0;
}