[BaekJoon] 1081 ์ˆซ์ž ์นด๋“œ 2
ยท
๐Ÿ’ฏ CodingTest/BaekJoon
โ— ์ž…๋ ฅ์œผ๋กœ ๋ฐ›์€ ๋‘๊ฐœ์˜ ๋ฆฌ์ŠคํŠธ๋ฅผ ๋น„๊ตํ•ด ๋‘๋ฒˆ์งธ ๋ฆฌ์ŠคํŠธ์— ์žˆ๋Š” ์นด๋“œ์˜ ์ข…๋ฅ˜์—๋”ฐ๋ผ ์ฒซ๋ฒˆ์งธ ๋ฐฐ์—ด์— ์žˆ๋Š” ๋ฐ์ดํ„ฐ๊ฐ€ ๋ช‡๊ฐœ์ธ์ง€ ๊ณ„์‚ฐํ•˜๋Š” ๋ฌธ์ œ์ด๋‹ค. n = int(input()) cards = list(map(int, input().split())) m = int(input()) cardType = list(map(int, input().split())) cards.sort() cardDic = {key : 0 for key in cards} for t in cards: cardDic[t] += 1 keyList = sorted(list(cardDic.keys()) ) def binarySearch (data, num): low = 0 high = len(data) - 1 while low data[mid] : l..