Pagini recente » Cod sursa (job #680708) | Cod sursa (job #2978510) | Cod sursa (job #387117) | Cod sursa (job #1913257) | Cod sursa (job #2370661)
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
unordered_map < int , bool > M;
int main()
{
int x , op , n;
fin >> n;
for(int i = 1 ; i <= n ; i++)
{
fin >> op >> x;
if(op == 1 && !M[x])
M[x] = true;
else if(op == 2)
M[x] = false;
else if(op == 3)
fout << M[x] << "\n";
}
fin.close();
fout.close();
}