fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. set<int> s = {1, 2, 3, 4, 5};
  6. s.erase(*min_element(s.begin(), s.end()));
  7. for (auto it : s) cout << it << ' ';
  8. return 0;
  9. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
2 3 4 5