fork download
  1. #include <iostream>
  2. using namespace std;
  3. #include<bits/stdc++.h>
  4. int main() {
  5. // your code goes here
  6. set<int> s;
  7. s.insert(1);
  8. s.insert(2);
  9. if(s.find(2)!=s.end())
  10. s.erase(2);
  11. for(int x : s)
  12. cout << x;
  13. return 0;
  14. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
1