Advertisement
Josif_tepe

Untitled

May 18th, 2024
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4.     set<int> st;
  5.  
  6.     int n;
  7.     cin >> n;
  8.     for(int i = 0; i < n; i++) {
  9.         int x;
  10.         cin >> x;
  11.         st.insert(x);
  12.     }
  13.  
  14.     for(set<int>::iterator it = st.begin(); it != st.end(); it++) {
  15.         cout << *it << endl;
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement