From 0d5afb37d0a60246c2f3a0b88d3577fe9d790f52 Mon Sep 17 00:00:00 2001 From: Saksham Garg Date: Mon, 14 Dec 2020 14:45:54 +0530 Subject: [PATCH] Create sets-STL-HR.cpp --- sets-STL-HR.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sets-STL-HR.cpp diff --git a/sets-STL-HR.cpp b/sets-STL-HR.cpp new file mode 100644 index 0000000..94af5e2 --- /dev/null +++ b/sets-STL-HR.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; + + +int main() { + /* Enter your code here. Read input from STDIN. Print output to STDOUT */ + int n, q, val; + set s; + cin>>n; + for(int i=0;i>q>>val; + if(q == 1){ + s.insert(val); + } + else if(q == 2){ + s.erase(val); + } + else{ + cout<<(s.find(val) == s.end() ? "No" : "Yes")<