Skip to content

Commit

Permalink
#5 1920번 수 찾기
Browse files Browse the repository at this point in the history
  • Loading branch information
leejw-lu committed May 2, 2023
1 parent f2680f2 commit 3129177
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 정렬/1920_수 찾기.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import sys
read=sys.stdin.readline

N=int(read())
A=set(map(int,read().split())) #set을 해주면 시간초과 안뜬다.
M=int(read())
arr=list(map(int,read().split()))

for i in arr:
print(1) if i in A else print(0)

0 comments on commit 3129177

Please sign in to comment.