ylab 2022. 2. 22. 18:49

이코테에서 이진탐색 공부를 하다가 신선한 발상?! 나만몰랐던 발상?! 알게됨 ㅋㅋ

 

#계수 정렬

n = int(input())

array = [0]*1000001

for i in input().split():
    array[int(i)]=1

m = int(input())
x= list(map(int,input().split()))

for i in x:
    if array[i]==1:
        print('yes',end=" ")
    else:
        print('no',end = " ")

 

댓글수0