Cod sursa(job #2550413)
Utilizator | Data | 18 februarie 2020 19:45:52 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.42 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_set <int> a;
int n;
int main()
{
fin >> n;
for(;n;n--)
{
int x,y;
fin >> x >> y;
if(x==1)
a.insert(y);
if(x==2)
a.erase(y);
if(x==3)
fout << (a.find(y)!=a.end()) << "\n";
}
return 0;
}