Programming contests

ECN selejtező programozó csapatverseny, 2017. április 12.

April 12, 2017, 10:00 AM – April 12, 2017, 3:00 PM

Distinct Count

Given an array A of N integers, classify it as being Good, Bad, or Average. It is called Good if it contains exactly X distinct integers, Bad if it contains less than X distinct integers, and Average if it contains more than X distinct integers.

Input Specification

The first line of the input consists of a single integer T, denoting the number of test cases (1 ≤ T ≤ 50). The first line of each test case consists of two space-separated integers, denoting N and X (1 ≤ NX ≤ 13000). The second line of each test case consists of N space-separated integers, denoting the array elements (1 ≤ Ai ≤ 109).

Output Specification

Print the required answer for each test case on a new line.

Sample Input

  1. 4
  2. 4 1
  3. 1 4 2 5
  4. 4 2
  5. 4 2 1 5
  6. 4 3
  7. 5 2 4 1
  8. 4 4
  9. 1 2 4 5
download as text file

Output for Sample Input

  1. Average
  2. Average
  3. Average
  4. Good
download as text file
University of Debrecen; Faculty of Informatics; v. 09/30/2024