1920

    1920번 파이썬

    방법은 1. 리스트에 있는지 전체 돌려서 확인 2. 이분탐색으로 확인 이분탐색 시간복잡도가 O(logn)이기 때문에 시간은 더 적게걸린다! import sys input = sys.stdin.readline n = int(input()) n_ary=list(map(int,input().split())) m = int(input()) m_ary=list(map(int,input().split())) n_ary.sort() ''' for item in m_ary: if item in n_ary: print(1) else: print(0) ''' for item in m_ary: left=0 right=n-1 found=False while left n_ary[mid]: left=mid+1 elif item ..