hash map
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
dic = {}
for _ in range(N):
adress, pw = input().split()
dic[adress] = pw
for _ in range(M):
print(dic[input().rstrip()])
'practivceAlgorithm > 백준' 카테고리의 다른 글
[백준][Python] 12782 비트 우정지수 (0) | 2021.09.14 |
---|---|
[백준][Python] 14500 테트노미노 (0) | 2021.09.14 |
[백준][Python] 17626 Four Squares (0) | 2021.09.13 |
[백준][Python] 16928 뱀과 사다리게임 (0) | 2021.09.13 |
[백준][Python] 11659 구간 합 구하기 4 (0) | 2021.09.13 |