#K9151. Unique Groups of Chains

    ID: 37991 Type: Default 1000ms 256MiB

Unique Groups of Chains

Unique Groups of Chains

In this problem, you are given a series of test cases. Each test case provides a list of integers representing the power levels of chains. Your task is to determine the number of unique power levels present in each test case.

More formally, for a test case with (N) chains and corresponding power levels (P_1, P_2, \dots, P_N), you must compute (\lvert { P_1, P_2, \dots, P_N } \rvert), the cardinality of the set of power levels.

It is guaranteed that all input values are within reasonable limits.

inputFormat

The input begins with an integer (T) representing the number of test cases. For each test case, the first line contains a single integer (N) denoting the number of chains. The next line contains (N) space-separated integers representing the power levels of the chains. Note that if (N = 0), the subsequent line will be empty.

outputFormat

For each test case, output one line containing a single integer, the number of unique chain power levels.## sample

2
5
3 1 2 3 2
4
4 4 4 4
3

1

</p>