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