By Kay Akashi
You're given an integer array consisting of distinct integers , …, , Kay's favourite numbers. Then you're given an integer array consisting of integers , …, . Count the number of such that is one of Kay's favourite numbers.
Note that, doesn't necessarily consist of distinct integers.
.
. No element in and is larger than and smaller than .
. No element in and is larger than and smaller than .
The first line contains one number, . The second line contains numbers, which is an array . The third line also contains numbers, which is an array .
Output the answer.
3
1 7 9
4 9 9
2
meet the condition since is one of Kay's favourite numbers. Hence the answer is .
3
1 2 3
3 2 1
3
meet the condition hence the answer is .