Pagini recente » Cod sursa (job #3000763) | Cod sursa (job #526335) | Cod sursa (job #536758) | Cod sursa (job #277133) | Cod sursa (job #2981017)
#include <algorithm>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
using namespace std;
#ifdef LOCAL
ifstream fin("input.txt");
#define fout cout
#else
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
#define endl '\n'
#endif
int n;
map<int, bool> mp;
int t, x;
int main() {
fin >> n;
while (n--) {
fin >> t >> x;
if (t == 1) mp[x] = 1;
else if (t == 2) mp[x] = 0;
else fout << mp[x] << endl;
}
return 0;
}