Advertisement
senb1

krsu 5452

Mar 13th, 2023
615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. /*
  2. by: senb1 aka amigo
  3. */
  4.  
  5. #include <bits/stdc++.h>
  6.  
  7. #define ll long long
  8. #define ull unsigned long long
  9. #define all(x) x.begin(), x.end()
  10. #define fr first
  11. #define sc second
  12. #define mk make_pair
  13. #define rall(x) x.rbegin(), x.rend()
  14. #define endl '\n'
  15.  
  16. using namespace std;
  17.  
  18. const ll mod = 998244353;
  19. const ll maxn = 1e7 + 5;
  20. const ll inf = 1e9 + 6;
  21.  
  22. void solve() {
  23.     int n;
  24.     cin >> n;
  25.     set<int> st;
  26.     for (int i = 0; i < n; i++) {
  27.         int x;
  28.         cin >> x;
  29.         st.insert(x);
  30.     }
  31.     cout << st.size() << endl;
  32. }
  33. /*
  34.  
  35. */
  36.  
  37. int main() {
  38.     ios::sync_with_stdio(0);
  39.     cin.tie(0);
  40.  
  41.     int t = 1;
  42.     // cin >> t;
  43.     while (t--)
  44.         solve();
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement