Advertisement
Josif_tepe

Untitled

Jun 2nd, 2021
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. #include <set>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     set<int> st;
  10.     int n;
  11.     cin >> n;
  12.     for(int i = 0; i < n; i++) {
  13.         int x;
  14.         cin >> x;
  15.         st.insert(x);
  16.     }
  17.     for(int x : st) {
  18.         cout << x << endl;
  19.     }
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement