The Number of Different Rows
Time limit: 5000ms
Memory limit: 256mb
Description:
Given an n x m matrix A, please count the number of different rows of A.
We say the i-th row and the j-th row are different, if and only if A_ik != A_jk holds for some k.
Input:
There are two positive integers n and m on the first line, 1 <= n,m <= 10.
In the following n lines, each line has m integers which represents the matrix A, i.e. the j-th integer on the i-th line is A_ij.
We have 0 <= A_ij <= 100.
Output:
The number of different rows.
Sample input:
3 4
1 0 10 1
2 3 4 5
1 0 10 1
Sample output:
2
Hint:
The first row is the same as the last one.
Submit