Pagini recente » Cod sursa (job #2427420) | Istoria paginii runda/12951410473088131 | Istoria paginii runda/12951410473088131 | tema | Cod sursa (job #2748605)
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using oset = tree<T, null_type, less<T>,
rb_tree_tag, tree_order_statistics_node_update>;
#ifdef Wi_TEST
template<typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1,T2> p) {
out << "(" << p.first << ", " << p.second << ")";
out.flush();
return out;
}
#define deb(x) cout << #x << " = " << x << endl;
#else
#define deb(x)
#define cin fin
#define cout fout
#endif
int main() {
ios_base::sync_with_stdio(false);
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n;
cin >> n;
unordered_set<int> s;
while(n--) {
int a, b;
cin >> a >> b;
if(a == 1) {
s.insert(b);
} else if(a == 2) {
s.erase(b);
} else if(a == 3) {
cout << s.count(b) << '\n';
}
}
return 0;
}