Pagini recente » Cod sursa (job #2878834) | Cod sursa (job #525390) | Cod sursa (job #1975120) | Atasamentele paginii Clasament lsp_01 | Cod sursa (job #2721316)
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int q;
unordered_map <int, bool> M;
int main()
{
fin >> q;
while(q--)
{ int type, x;
fin >> type >> x;
if(type == 1)
M[x] = 1;
else if(type == 2)
M[x] = 0;
else
fout << M[x] << '\n';
}
return 0;
}