
Baekjoon/이분탐색
[백준] 10816 숫자 카드 2 (실버4) / 이분탐색
문제요약 나의 코드 및 설명 n = int(input()) s = list(map(int, input().split())) s.sort() d = {} #개수 담을 딕셔너리 생성 for i in range(len(s)): if s[i] not in d: #만약 딕셔너리에 없다면 d[s[i]] = 1 #해당 값에 카운트 1 else: #만약 이미 딕셔너리에 있다면 d[s[i]] += 1 #해당 값에 카운트 += 1 m = int(input()) num_list = list(map(int, input().split())) result = [] #이분탐색 시작 for x in num_list: #두 번째 숫자리스트에 있는 값을 하니씩 확인 start = 0 #시작 인덱스 : 0 end = n-1 #끝 인덱스 ..