Advertisement
Josif_tepe

Untitled

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