We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
+ 0 comments Here are the solution of Sets-STL in C++ Hacker Rank Solution
+ 0 comments Here is problem solution - https://thecscience.com/hackerrank-sets-stl-in-cpp-problem-solution.html
+ 0 comments Here is the Solution of Sets-STL in C++ HackerRank Solution https://www.brokenprogrammers.com/sets-stl-in-cpp-hackerrank-solution
+ 0 comments Here is problem solution - https://thecscience.com/hackerrank-sets-stl-in-cpp-problem-solution.html
+ 0 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; cin>>n; set<int> s; while(n--){ int a,b; cin>>a>>b; if(a==1){ s.insert(b); } else if(a==2){ s.erase(b); } else if(a==3){ set<int>::iterator itr = s.find(b); if(itr!=s.end()){ cout<<"Yes"<<endl; } else{ cout<<"No"<<endl; } } } return 0;
}
Load more conversations
Sort 287 Discussions, By:
Please Login in order to post a comment