#P3298. [SDOI2013] 泉
[SDOI2013] 泉
Description
As a proud member of the Jinan Springs History Research Group, Mingming has collected, for different years, the flow index of different spring zones. This index is a non-negative integer less than . In year , the flow indices of the six spring zones are .
Now Mingming wants to know how many pairs of different years and () have exactly spring zones whose flow indices are equal in those two years.
Input Format
The first line contains two integers .
The next lines each contain integers .
Output Format
Output a single integer on one line, representing the answer.
3 3
1 2 3 4 5 6
1 2 3 0 0 0
0 0 0 4 5 6
2
Hint
Constraints: ,,且保证 在 中均匀随机选取。
Translated by ChatGPT 5
京公网安备 11011102002149号