Pagini recente » Cod sursa (job #35895) | Cod sursa (job #2019946) | Cod sursa (job #3337488) | Cod sursa (job #3329319) | Cod sursa (job #3318921)
#include<bits/stdc++.h>
using namespace std;
const string file="hashuri";
ifstream f(file+".in");
ofstream g(file+".out");
//#define f cin
//#define g cout
unordered_set<int>s;
int main(){
int n;
f>>n;
while (n--) {
int t,x;
f>>t>>x;
if (t==1) s.insert(x);
else if (t==2) {
if (s.count(x)) s.erase(x);
}
else {
g<<s.count(x)<<'\n';
}
}
system("pause");
return 0;
}