https://www.acmicpc.net/problem/14425
Silver 3
틀린 내용 지적 환영합니다
import sys
input = sys.stdin.readline
def solution(N, M, S, strings):
return len(list(filter(lambda x: x in samples, candidates)))
if __name__ == "__main__":
N, M = map(int, input().split())
samples = set(input() for _ in range(N))
candidates = [input() for _ in range(M)]
print(solution(N, M, samples, candidates))
3 O(1) O(M) = O(M)