https://www.acmicpc.net/problem/1920
import sys
input = sys.stdin.readline
n = map(int, input())
a = list(map(int, input().split()))
pool = {}
for k in a:
pool[k] = 1
print(pool)
m = map(int, input())
b = list(map(int, input().split()))
for t in b:
if t in pool:
print(1)
else:
print(0)
728x90
'Algorithms > Algorithms' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๋ฐฑ์ค ์ด๋ถํ์ ๋ฌธ์ ๋ค (1072 ๊ฒ์, 1654 ๋์ ์๋ฅด๊ธฐ, 1920 ์์ฐพ๊ธฐ, 2512 ์์ฐ) (0) | 2021.11.12 |
---|---|
1๋ก๋ง๋ค๊ธฐ (๋ฐฑ์ค1463) (0) | 2021.10.13 |
์์ด ์ฌ์ดํด (๋ฐฑ์ค 10451) (0) | 2021.10.12 |
์ฐ๊ฒฐ์์์๊ฐ์ (๋ฐฑ์ค 11724) (0) | 2021.10.12 |
์ด๋ถ ๊ทธ๋ํ (๋ฐฑ์ค 1707) (0) | 2021.10.08 |