Cod sursa(job #2356273)
| Utilizator | Data | 26 februarie 2019 16:32:31 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.34 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n,t,x;
unordered_set<int> h;
int main()
{
f>>n;
for(;n;n--)
{
f>>t>>x;
if(t==1)h.insert(x);
else if(t==2)h.erase(x);
else h.find(x)==h.end()?g<<"0\n":g<<"1\n";
}
return 0;
}
