Pagini recente » Cod sursa (job #919205) | Cod sursa (job #277334) | Cod sursa (job #2881113) | Cod sursa (job #3033322) | Cod sursa (job #2863276)
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define dbg(x) cout << #x <<": " << x << "\n";
using ll = long long;
const string myf = "hashuri";
ifstream fin(myf + ".in");
ofstream fout(myf + ".out");
int n;
int op, x;
map<int, int> m;
int main() {
fin >> n;
while (n--) {
fin >> op >> x;
if (op == 1)
m[x] = 1;
if (op == 2) {
if (m.find(x) != m.end())
m.erase(m.find(x));
}
if (op == 3)
fout << (m.find(x) != m.end()) << '\n';
}
fin.close();
fout.close();
return 0;
}