[20250718] BOJ / G4 / 구간 나누기 2 / 이인희 #498
Merged
+59
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/13397
🧭 풀이 시간
35 분
👀 체감 난이도
✏️ 문제 설명
어떠한 N길이 수열이 주어지고, 이를 M조각으로 토막낼수있다. 토막난 조각의 구간을 조각내부의 최대숫자와 최소숫자의 차로 정의할 때, N, M, 수열이 주어지고 조각의 구간의 최댓값이 최소가 되도록 하는 경우의 최소값을 출력하는 문제
🔍 풀이 방법
⏳ 회고
보통 코테 문제는 경우의 수를 만들고, 정답인지를 판단하는 것이다.
하지만 여러 이분탐색 문제를 푸니, 먼저 정답인 수를 가정하고, 이것이 가능한 경우인지를 판단하는 방식인
정답 변수 자체가 이분탐색의 대상이 됨도 또한 생각해야한다.최대의 최소, 최소의 최대, 값이 이상하게 많음, 완탐으로 힘듬 이러한 힌트들이 있을 때 이분탐색을 떠올려보자.