Scroll indicator done
728x90

https://www.acmicpc.net/problem/10816


n = int(input())
card = list(map(int, input().split()))
m = int(input())
have = list(map(int, input().split()))
dic = dict()

for c in card:
    if c not in dic:
        dic[c] = 1
    else:
        dic[c] += 1

for h in have:
    if h in dic:
        print(str(dic[h]), end = " ")
    else:
        print("0", end = " ")

 

 

 

728x90

'BAEKJOON > Python' 카테고리의 다른 글

[B10828][스택][python]  (0) 2021.03.17
[B9012][괄호][python]  (0) 2021.03.16
[B11650][좌표 정렬하기][python]  (0) 2021.03.14
[B15489][파스칼 삼각형][python]  (0) 2021.03.14
[B2609][최대공약수와 최소공배수][python]  (0) 2021.03.12