Cod sursa(job #1900046)
Utilizator | Data | 3 martie 2017 09:32:28 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.36 kb |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int q;
f >> q;
unordered_set<int> s;
for(int t, x; q; --q){
f >> t >> x;
if(t == 1) s.insert(x);
else if(t == 2) s.erase(x);
else g << (s.find(x) != end(s)) << '\n'; }
return 0;
}