Cod sursa(job #1520479)
Utilizator | Data | 8 noiembrie 2015 20:30:46 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.42 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream in("hashuri.in");
ofstream out("hashuri.out");
unordered_set<int> h;
int main()
{
int t;
in>>t;
while(t--)
{
int t,x;
in>>t>>x;
if
(t==1)h.insert(x);
else
if
(t==2)h.erase(x);
else
out<<(h.find(x)!=h.end())<<'\n';
}
return 0;
}