fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. vector<int>v = {1,2,3,4,1,3,4};
  6. set<int>s(v.begin(),v.end());
  7. for(auto x: s)cout<<x<<" ";
  8. cout<<endl;
  9.  
  10. return 0;
  11. }
Success #stdin #stdout 0s 5480KB
stdin
Standard input is empty
stdout
1 2 3 4