Pagini recente » Istoria paginii runda/agm-2018-testare/clasament | Cod sursa (job #1659566) | Cod sursa (job #2201795) | Istoria paginii runda/testround4/clasament | Cod sursa (job #2075069)
#include <iostream>
#include <hash_map>
#include <fstream>
using namespace std;
using namespace __gnu_cxx;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n, op, x;
int main()
{
hash_map<int, bool> hashTable;
fin>>n;
while (n) {
fin>>op>>x;
switch (op) {
case 1:
hashTable[x] =1;
break;
case 2:
hashTable[x] = 0;
break;
case 3:
fout<<hashTable[x]<<"\n";
break;
}
n--;
}
return 0;
}