#K39587. Count Unique User IDs

    ID: 26453 Type: Default 1000ms 256MiB

Count Unique User IDs

Count Unique User IDs

You are given multiple test cases. In each test case, you are provided with an integer \(n\) representing the number of user IDs followed by \(n\) user IDs. Your task is to compute the number of unique user IDs in each test case.

The input begins with an integer \(T\) (the number of test cases). For each test case, the first line contains an integer \(n\) and the following \(n\) lines contain a user ID each. The answer for each test case is the count of distinct user IDs.

Example:

Input:
2
5
alice
bob
alice
charlie
bob
3
admin
user1
admin

Output: 3 2

</p>

Remember to use standard input and output in your solution.

inputFormat

The input is read from standard input (stdin) and has the following format:

  1. An integer \(T\) denoting the number of test cases.
  2. For each test case:
    1. An integer \(n\) indicating the number of user IDs.
    2. \(n\) lines follow, each containing a user ID (a string).

outputFormat

For each test case, output a single line containing one integer — the count of unique user IDs in that test case. The output is printed to standard output (stdout).

## sample
2
5
alice
bob
alice
charlie
bob
3
admin
user1
admin
3

2

</p>