Pagini recente » Cod sursa (job #2455306) | Cod sursa (job #3294420) | Cod sursa (job #1763947) | Cod sursa (job #1083254) | Cod sursa (job #2682545)
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define MOD 1000000007
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef double ld;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
struct Hash{
size_t operator()(const int &x) const {
return x % MOD;
}
};
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
fin >> n;
unordered_map<int, bool, Hash> umap;
while (n--) {
int op, x;
fin >> op >> x;
if (op == 1) {
umap[x] = true;
} else if (op == 2) {
umap[x] = false;
} else {
fout << (int)umap[x] << "\n";
}
}
return 0;
}