Cod sursa(job #2911628)
Utilizator | Data | 30 iunie 2022 20:12:50 | |
---|---|---|---|
Problema | Hashuri | Scor | 40 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.35 kb |
#include<bits/stdc++.h>
using namespace std;
ifstream F("hashuri.in");
ofstream G("hashuri.out");
int t,x;
set<int> m;
int main()
{
for(F>>x;F>>t>>x;)
if(t==1&&m.find(x)==m.end())
m.insert(x);
else if(t==2&&m.find(x)!=m.end())
m.erase(x);
else if(t==3)
G<<(m.find(x)!=m.end())<<'\n';
return 0;
}