https://www.acmicpc.net/problem/1920
N=int(input())
nrr=list(map(int, input().split()))
M=int(input())
mrr=list(map(int, input().split()))
nrr.sort()
foriinmrr:
left=0right=N-1isTarget=Falsewhileleft<=right:
mid=int((left+right) /2)
ifnrr[mid] ==i:
isTarget=Truebreakifnrr[mid] >i:
right=mid-1else:
left=mid+1mid=int(right/2)
ifisTarget:
print(1)
else:
print(0)
https://www.acmicpc.net/problem/1920