#K36452. Distinct Blend Counting
Distinct Blend Counting
Distinct Blend Counting
You are given n blend descriptions. Each description is a space-separated sequence of integers. The first integer of each description represents the unique blend identifier. Your task is to count the number of distinct blend identifiers.
More formally, let each blend be represented as a string of numbers. If the i-th blend has the description S_i and its first integer is b_i, then you need to output the size of the set \(\{ b_1, b_2, \ldots, b_n \}\).
Note: All input is read from stdin
and all output is printed to stdout
.
inputFormat
The first line contains an integer n --- the number of blends.
Then follows n lines, each containing a blend description as space-separated integers. The first integer in each line represents the blend's unique identifier, and the remaining numbers (if any) are additional values.
outputFormat
Output a single integer: the number of distinct blend identifiers.
## sample5
1 2 3
2 3 4
3 4
4
5 1 4
5