Cod sursa(job #3318918)
| Utilizator | Data | 29 octombrie 2025 18:57:16 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.35 kb |
#include <fstream>
#include <set>
using namespace std;
ifstream fcin("hashuri.in");
ofstream fout("hashuri.out");
int q,x,c;
set <int> s;
int main()
{
fcin>>q;
while(q--)
{
fcin>>c>>x;
if(c==1) s.insert(x);
if(c==2) if(s.count(x)) s.erase(x);
if(c==3) fout<<s.count(x)<<'\n';
}
return 0;
}
