Algorithm
[백준] 숫자 카드 2
seandoesdev
2023. 9. 12. 23:23
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=' ')