Pagini recente » Monitorul de evaluare | Cod sursa (job #1506066) | Cod sursa (job #1212874) | Cod sursa (job #2604941) | Cod sursa (job #1413233)
#include <iostream>
#include <fstream>
#include <vector>
#include <unordered_set>
using namespace std;
const int maxn = 1000005;
const int mod = 666013;
int n;
unordered_set<int> _hash;
int main() {
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
fin >> n;
while(n -- ) {
int op, x;
fin >> op >> x;
if(op == 1)
_hash.insert(x);
if(op == 2)
_hash.erase(x);
if(op == 3)
fout << (_hash.find(x) != _hash.end()) << "\n";
}
}