Advertisement
Josif_tepe

Untitled

May 18th, 2024
559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 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(int x : st) {
  15.       cout << x << endl;  
  16.     }
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement