Advertisement
Josif_tepe

Untitled

Jun 2nd, 2021
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 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.     cout << st.size() << endl;
  18.     return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement