You are viewing a single comment's thread. Return to all comments →
//M.Kohaku
using namespace std;
int main(){ sets; int n; cin >> n; for(int i=0;i p; cin >> p.first >> p.second; int x = p.first; int y = p.second; if(x==1){ s.insert(y); } else if(x==2){ s.erase(y); } else if(x==3){ if(s.count(y)) cout << "Yes" << endl; else cout << "No" << endl; } } }
Seems like cookies are disabled on this browser, please enable them to open this website
Sets-STL
You are viewing a single comment's thread. Return to all comments →
//M.Kohaku
include
using namespace std;
int main(){ sets; int n; cin >> n; for(int i=0;i p; cin >> p.first >> p.second; int x = p.first; int y = p.second; if(x==1){ s.insert(y); } else if(x==2){ s.erase(y); } else if(x==3){ if(s.count(y)) cout << "Yes" << endl; else cout << "No" << endl; } } }