top of page

소스 코드 제출

공개·회원 52명

2025근로자의 날

# n,m=map(int,input().split())

# a=list(map(int,input().split()))

# a.sort()

# s=1

# l=a[0]

# for i in range(n):

# if m<=a[i]-l:

# s=s+1

# l=a[i]

# # print(s,l)

# print(s)

def bs(x):

global n,m,a,b

l=0

r=n

while l<=n:

c=l+(r-l)//2

if c==x:

return 1

elif c>x:

r=c-1

else:

l=c+1

return 0

n=int(input())

a=list(map(int,input().split()))

a.sort()

m=int(input())

b=list(map(int,input().split()))

for i in range(m):

print(bs(b[i]))

1회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page