Pagini recente » Cod sursa (job #427388) | Cod sursa (job #1408790) | Cod sursa (job #174723) | Cod sursa (job #883770) | Cod sursa (job #1423509)
#include <fstream>
#include <unordered_map>
using namespace std;
unordered_map<int, int> smth;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int main()
{
int N;
fin >> N;
for (int op, x; N; N--){
fin >> op >> x;
if (op == 1)
if(!smth.count(x))
smth[x] = 1;
if (op == 2)
if(!smth.count(x))
smth[x] = 0;
if (op == 3)
fout << smth[x];
}
return 0;
}