Pagini recente » Cod sursa (job #3203430) | Cod sursa (job #2650980) | Cod sursa (job #1189213) | Cod sursa (job #2804380) | Cod sursa (job #1921515)
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream f ("hashuri.in");
ofstream t ("hashuri.out");
typedef unordered_map <int,bool> int_hash;
int main()
{
int_hash table;
int n;
f>>n;
for (int type,target;n;--n){
f>>type>>target;
if (type==1)
table.emplace(target,true);
else if (type==2)
table[target]=false;
else if (type==3)
t<<table[target]<<'\n';
}
return 0;
}