Skip to content

Commit c506a4a

Browse files
committed
숫자 카드 풀이
1 parent ca30dea commit c506a4a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

BAEKJOON/2Silver/숫자 카드.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 자료 구조, 정렬, 이분 탐색, 해시를 사용한 집합과 맵
2+
# https://www.acmicpc.net/problem/10815
3+
4+
input = __import__("sys").stdin.readline
5+
N = int(input())
6+
cards = set(map(int, input().split()))
7+
M = int(input())
8+
finds = list(map(int, input().split()))
9+
10+
answer = []
11+
for k in finds:
12+
if k in cards:
13+
answer.append("1")
14+
else:
15+
answer.append("0")
16+
17+
print(" ".join(answer))

0 commit comments

Comments
 (0)