15 lines
244 B
Python
15 lines
244 B
Python
import sys
|
|
input = sys.stdin.readline
|
|
|
|
N, M = map(int, input().split())
|
|
hashMap = dict()
|
|
|
|
for _ in range(N) :
|
|
hashMap[input().rstrip()] = 1
|
|
|
|
count = 0
|
|
for _ in range(M) :
|
|
if input().rstrip() in hashMap :
|
|
count += 1
|
|
|
|
print(count) |