Piper inherited the timber yard at the eel marshes of Slitherwick along with its curious bookkeeping system for crates. Time to make sense of it. Task: Print the number of distinct values that appear in both arrays. Input format: First line: n and m. Second line: n integers. Third line: m integers. Output format: Print the size of the intersection. Constraints: 1 <= n <= 642; -1000000000 <= a[i],x <= 1000.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 642; -1000000000 <= a[i],x <= 1000.
