from sys import stdin
from collections import Counter
n = stdin.readline().rstrip()
card = list(map(int, stdin.readline().split()))
m = stdin.readline().rstrip()
input_card = list(map(int, stdin.readline().split()))
count = Counter(card)
for i in input_card:
if i in count:
print(count[i], end=' ')
else:
print(0, end=' ')
'Algorithm' 카테고리의 다른 글
[Project_Euler] Even Fibonacci Numbers (0) | 2024.04.05 |
---|---|
[Project_Euler] Multiples of 3 or 5 (0) | 2024.04.05 |
[프로그래머스] 다리를 지나는 트럭 (0) | 2023.09.10 |
[프로그래머스] 폰켓몬 (0) | 2023.07.05 |
[프로그래머스] 완주하지 못한 선수 (0) | 2023.07.04 |