fork download
  1. #include <iostream>
  2. #include <set>
  3. #include <cstring>
  4. using namespace std;
  5.  
  6. int main() {
  7. // your code goes here
  8. std::set<int> x={10,11,13,14};
  9. x.insert(12);
  10.  
  11.  
  12. for (const int& i : x) // access by const reference
  13. std::cout << i << ' ';
  14. std::cout << '\n';
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 16056KB
stdin
Standard input is empty
stdout
10 11 12 13 14