Pagini recente » Cod sursa (job #1812552) | Cod sursa (job #1493590) | Cod sursa (job #773519) | Cod sursa (job #1493596) | Cod sursa (job #2793201)
/* [A][M][C][B][N] / [K][R][I][P][6][8] */
#include <bits/stdc++.h>
#include <unordered_map>
using namespace std;
typedef long long ll;
const char sp = ' ', nl = '\n';
const int MOD = 9973;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map<int, int> hashMap;
int main() {
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int n;
fin >> n;
while (n--) {
int p, x;
fin >> p >> x;
if (p == 1)
hashMap[x] = 1;
if (p == 2)
hashMap[x] = 0;
if (p == 3)
fout << (hashMap.find(x) != hashMap.end() ? hashMap[x] : 0) << nl;
}
}