You are viewing a single comment's thread. Return to all comments →
using namespace std;
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n,x,y; cin>>n; sets; for(int i=0;i>x>>y; if(x==1) s.insert(y); else if(x==2) s.erase(y); else{ set::iterator itr = s.find(y); if(itr!=s.end()) cout<<"Yes"<
} return 0;
}
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 →
include
include
include
include
include
include
using namespace std;
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n,x,y; cin>>n; sets; for(int i=0;i>x>>y; if(x==1) s.insert(y); else if(x==2) s.erase(y); else{ set::iterator itr = s.find(y); if(itr!=s.end()) cout<<"Yes"<
}