fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. void solve() {
  4. int n, x;
  5. cin >> n >> x;
  6. set<int> s;
  7. for (int i = 0; i < n; i++) {
  8. int a;
  9. cin >> a;
  10. s.insert(a);
  11. }
  12. if (s.size() == x) cout << "Good\n";
  13. else if (s.size() < x) cout << "Bad\n";
  14. else cout << "Average\n";
  15. }
  16. int main() {
  17. ios_base::sync_with_stdio(false);
  18. cin.tie(NULL);
  19. int t;
  20. cin >> t;
  21. while (t--) solve();
  22. return 0;
  23. }
Success #stdin #stdout 0s 5312KB
stdin
4
4 1
1 4 2 5
4 2
4 2 1 5
4 3
5 2 4 1
4 4
1 2 4 5
stdout
Average
Average
Average
Good