Advertisement
Josif_tepe

Untitled

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