Pagini recente » Diferente pentru problema/dsip intre reviziile 2 si 1 | Cod sursa (job #212245) | Cod sursa (job #2557416) | Cod sursa (job #1805499) | 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;
}