#K49602. Library Unique Titles
Library Unique Titles
Library Unique Titles
You are given a library database and you need to count the number of unique book titles for multiple test cases. For each test case, a list of book titles is provided, and your task is to determine how many distinct titles exist in that test case. Titles are case-sensitive; that is, for example, The Iliad and the Iliad are considered different.
Mathematically, for each test case if \(T\) is the set of titles, you need to compute \(|T|\), the cardinality of \(T\).
inputFormat
The first line of the input contains an integer \(T\), representing the number of test cases.
For each test case, the first line contains an integer \(N\), the number of book titles.
This is followed by \(N\) lines, each containing one book title. A book title may include spaces.
outputFormat
For each test case, output a single integer on a new line, representing the number of unique book titles in that test case.
## sample2
5
The Great Gatsby
Moby Dick
The Great Gatsby
War and Peace
Moby Dick
3
To Kill a Mockingbird
1984
1984
3
2
</p>