forked from ndb796/python-for-coding-test
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path6.py
More file actions
20 lines (17 loc) Β· 607 Bytes
/
6.py
File metadata and controls
20 lines (17 loc) Β· 607 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# N(κ°κ²μ λΆν κ°μ) μ
λ ₯
n = int(input())
array = [0] * 1000001
# κ°κ²μ μλ μ 체 λΆν λ²νΈλ₯Ό μ
λ ₯ λ°μμ κΈ°λ‘
for i in input().split():
array[int(i)] = 1
# M(μλμ΄ νμΈ μμ²ν λΆν κ°μ) μ
λ ₯
m = int(input())
# μλμ΄ νμΈ μμ²ν μ 체 λΆν λ²νΈλ₯Ό 곡백μ κΈ°μ€μΌλ‘ ꡬλΆνμ¬ μ
λ ₯
x = list(map(int, input().split()))
# μλμ΄ νμΈ μμ²ν λΆν λ²νΈλ₯Ό νλμ© νμΈ
for i in x:
# ν΄λΉ λΆνμ΄ μ‘΄μ¬νλμ§ νμΈ
if array[i] == 1:
print('yes', end=' ')
else:
print('no', end=' ')