#K95952. Maximum Distinct Integers

    ID: 38977 Type: Default 1000ms 256MiB

Maximum Distinct Integers

Maximum Distinct Integers

You are given \(T\) test cases. For each test case, you're provided with an integer \(n\) and an array of \(n\) integers. Your task is to compute the maximum number of distinct integers in each array.

For example, if the array is [1, 2, 2, 3], the number of distinct integers is 3 (namely, 1, 2, and 3).

The answer for each test case is computed as follows:

\[ \text{Answer} = \left|\{a_1, a_2, \dots, a_n\}\right| \]

Your solution should read the input from standard input (stdin) and write the output to standard output (stdout).

inputFormat

The input begins with an integer \(T\) representing the number of test cases. Each test case consists of two lines:

  • The first line contains an integer \(n\) indicating the number of elements in the array.
  • The second line contains \(n\) space-separated integers.

outputFormat

For each test case, output a single line containing the maximum number of distinct integers that can be obtained from the array.

## sample
1
3
1 2 3
3