백준[Python] 14425.문자열 집합 - 파이썬


백준[Python] 14425.문자열 집합 - 파이썬

문제 코드 import sys import collections input = sys.stdin.readline N, M = map(int, input().split()) strHash = collections.defaultdict(int) cnt = 0 for _ in range(N): s = input().strip() strHash[s] for _ in range(M): s = input().strip() if s in strHash: cnt += 1 print(cnt) 링크 https://www.acmicpc.net/problem/14425 14425번: 문자열 집합 첫째 줄에 문자열의 개수 N과 M (1 ≤ N ≤ 10,000, 1 ≤ M ≤ 10,000)이 주어진다. 다음 N개의 줄..


원문링크 : 백준[Python] 14425.문자열 집합 - 파이썬