import sys
from collections import Counter # Counter 모듈 사용
input = sys.stdin.readline
temp = []
a = int(input())
b = list(map(int, input().split()))
c = int(input())
d = list(map(int, input().split()))
count = Counter(b)
for i in range(len(d)):
if d[i] in count:
print(count[d[i]], end=' ')
else:
print(0, end=' ')
'Coding Test Practice > Python' 카테고리의 다른 글
(Python) 백준 10773 / 제로 (0) | 2024.04.19 |
---|---|
(Python) 백준 11651 / 좌표 정렬하기 2 (0) | 2024.04.19 |
(Python) 백준 11866 / 요세푸스 문제 0 (0) | 2024.04.19 |
(Python) 백준 10866 / 덱 (0) | 2024.04.19 |
(Python) 백준 11650 / 좌표 정렬하기 (0) | 2024.04.18 |