Pagini recente » Cod sursa (job #2772206) | Cod sursa (job #2130508) | Cod sursa (job #1230463) | Cod sursa (job #1065346) | Cod sursa (job #3230775)
#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;
}