Pagini recente » Cod sursa (job #299494) | Cod sursa (job #2549437) | Cod sursa (job #2780265) | Cod sursa (job #1220197) | 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;
}