top of page

소스 코드 제출

공개·회원 63명

2026.01.11

n=int(input())

a=[0]*100003

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

for i in range(n):

x=b[i]%100003

while True:

if a[x]==0:

a[x]=b[i]

break

else:

if x==100002:

x=0

else:

x+=1

m=int(input())

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

for i in range(m):

y=q[i]%100003

f=0

while a[y]!=0:

if q[i]==a[y]:

f=1

print('1')

break

else:

if y==100002:

y=0

else:

y+=1

if f==0:

print('0')

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