Advertisement
Guest User

Untitled

a guest
Mar 14th, 2020
5,763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int t;
  6.     scanf("%d",&t);
  7.     while (t--)
  8.     {
  9.         int n;
  10.         scanf("%d",&n);
  11.         set<int> s;
  12.         while (n--)
  13.         {
  14.             int a;
  15.             scanf("%d",&a);
  16.             s.insert(a);
  17.         }
  18.         printf("%d\n",s.size());
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement