2024/11 30

99클럽 코테 스터디 7일차 TIL + 완전탐색

https://school.programmers.co.kr/learn/courses/30/lessons/84512 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krfrom itertools import productdef solution(word): answer = 0 vowels = ['A', 'E', 'I', 'O', 'U'] dict = [] for i in range(1,6): for v in product(vowels, repeat=i): dict.append(''.join(v)) dict.sort() answer = dict..

Algorithm/Problems 2024.11.04

99클럽 코테 스터디 6일차 TIL + 이분탐색

https://www.acmicpc.net/problem/2805import sysinput = sys.stdin.readlinen, m = map(int, input().split())trees = list(map(int, input().split()))start = 0end = max(trees)answer = 0 # 절단기 높이while start mid: total += t - mid if total >= m: start = mid + 1 answer = mid else: end = mid - 1print(answer)m과 n의 범위를 보고 이분탐색을 생각할 수 있다.절단기 높이의 최댓값을 구하는 것이기 때문에 굳이 mi..

Algorithm/Problems 2024.11.03