题目描述
Problem Description
Score: $ 200 $ points
Tsukukoma Paken had activities over $ N $ days during the winter vacation.
On the $ i $th day of activity, $ k_i $ members participated, and the names of the participants were $S_{i,1},\ S_{i,2},\ldots,\ S_{i,k_i}$.
How many members participated in all $ N $ days of activity, i.e., received the Perfect Attendance Award? Note that there are no members with the same name.
Input Format
The input is given from the standard input in the following format:
\(N\)
\(k_1\)
\(S_{1,1}\) \(S_{1,2}\) \(\ldots\) \(S_{1,k_1}\)
\(k_2\)
\(S_{2,1}\) \(S_{2,2}\) \(\ldots\) \(S_{2,k_2}\)
\(⋮\)
\(k_N\)
\(S_{N,1}\) \(S_{N,2}\) \(\ldots\) \(S_{N,k_N}\)
Output Format
Output the number of members who received the Perfect Attendance Award. Do not forget to add a newline at the end of the output.
Sample Input and Output
Sample Input #1
2
2
kaage penguinman
2
penguinman rho
Sample Output #1
1
Sample Input #2
3
1
penguinman
1
kaage
1
rho
Sample Output #2
0
Sample Input #3
3
3
a b c
2
a ba
3
a ba abc
Sample Output #3
1
Notes/Hints
None
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
2
2
kaage penguinman
2
penguinman rho
样例输出
1