BOJ - 10816 - 숫자 카드 2
Updated:
import sys
from collections import Counter
def solution():
N = int(input())
haveCardList = map(int, sys.stdin.readline().split())
M = int(input())
findCardList = map(int, sys.stdin.readline().split())
C = Counter(haveCardList)
ret = ""
for card in findCardList:
ret += str(C[card]) + " "
print(ret)
solution()
https://www.acmicpc.net/problem/10816
Leave a comment