Pagini recente » Monitorul de evaluare | Cod sursa (job #2075461) | Cod sursa (job #211668) | Cod sursa (job #2772152) | Cod sursa (job #3350984)
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int main(){
set<int> s;
int n;
fin >> n;
while(n--){
int c,x;
fin >> c >> x;
if(c == 1){
s.insert(x);
}
if(c == 2) s.erase(x);
if(c == 3){
int ok = 0;
auto it = s.begin();
while(it != s.end()){
if(*it == x) ok = 1;
it++;
}
fout << ok << '\n';
}
}
return 0;
}