给定N个序列,编号为1到N
第i个序列的长度是Li,第i个序列的第j个元素是aij。
请你确定有多少个互不相同的序列,请输出答案。
You are given NN sequences numbered 11 to NN.
NNL_1L1a_{1,1}a1,1a_{1,2}a1,2\dots…a_{1,L_1}a1,L1L_2L2a_{2,1}a2,1a_{2,2}a2,2\dots…a_{2,L_2}a2,L2\vdots⋮L_NLNa_{N,1}aN,1a_{N,2}aN,2\dots…a_{N,L_N}aN,LN
4
2 1 2
2 1 1
2 2 1
2 1 2
3
Sample Input 11 contains four sequences:
Except that Sequence 11 and Sequence 44 are the same, these sequences are pairwise different, so we have three different sequences.