Pagini recente » Cod sursa (job #2349733) | Cod sursa (job #59928) | Cod sursa (job #1613077) | Cod sursa (job #1412827) | Cod sursa (job #3177736)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map<int, bool> fr;
int main()
{
ios_base::sync_with_stdio(false);
fin.tie(NULL);
int n, x, p;
fin >> n;
while(n--)
{
fin >> p >> x;
if(p == 1) fr[x] = 1;
else if(p == 2) fr[x] = 0;
else fout << fr[x] << "\n";
}
fin.close();
fout.close();
return 0;
}