
이분탐색
해시를 사용한 집합과 맵
백준 4158번 CD

import sys
input=sys.stdin.readline
while True:
n,m=map(int,input().split())
cd_n={int(input()) for _ in range(n)}
cd_m={int(input()) for _ in range(m)}
if n==0 and m==0:
break
print(len(cd_n&cd_m))
22일차 Intersection of Two Arrays 와 비슷한 방식으로 시도하였다.
새롭게 안 개념은 없었다.
그동안 풀었던 문제와 알고리즘 복습하기
#99클럽 #코딩테스트준비 #개발자취업 #항해99 #TIL