Advertisement
sajid161

2:4 problem

Nov 29th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  3. using namespace std;
  4. int main()
  5. {
  6.     optimize();
  7.     int t;
  8.     cin>>t;
  9.     while(t--)
  10.     {
  11.       int n,x;
  12.      cin>>n>>x;
  13.     vector<int>v(n);
  14.      for(int i=0;i<n;i++)
  15.      {
  16.          cin>>v[i];
  17.      }
  18.      sort(v.begin(),v.end());
  19.      int sz=unique(v.begin(),v.end())-v.begin();
  20.      if(sz==x) cout<<"Good\n";
  21.      else if(sz>x)   cout<<"Average\n";
  22.      else cout<<"Bad\n";
  23.     }
  24.  
  25.  
  26. }
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement