#P15799. [GESP202603 五级] 找数
[GESP202603 五级] 找数
Background
Related multiple-choice and true/false questions: https://ti.luogu.com.cn/problemset/1209.
Problem Description
Given an array containing distinct positive integers and an array containing distinct positive integers, please help calculate how many numbers appear in both array and array .
Input Format
The first line contains two integers .
The second line contains positive integers representing array .
The third line contains positive integers representing array .
Output Format
Output one integer, representing the number of values that appear in both array and array .
3 5
4 2 3
3 1 5 4 6
2
Hint
Sample Explanation
In Sample 1, and appear in both arrays and .
Constraints
For of the testdata, it is guaranteed that .
For of the testdata, it is guaranteed that , .
Translated by ChatGPT 5