Cod sursa(job #3242793)
Utilizator | Data | 14 septembrie 2024 07:48:15 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.21 kb |
#import<bits/stdc++.h>
std::fstream f("hashuri.in");std::ofstream g("hashuri.out");std::unordered_set<int>s;int n,x,c;main(){for(f>>n;n--;){f>>c>>x;if(c==1)s.insert(x);if(c==2)s.erase(x);if(c==3)g<<s.count(x)<<'\n';}}