Skip to content

Conversation

@suyeun84
Copy link
Contributor

🧷 문제 링크

https://www.acmicpc.net/problem/1114

🧭 풀이 시간

120분

👀 체감 난이도

✏️ 문제 설명

통나무 길이 L이고, K개의 위치에서만 자를 수 있고, 자를 수 있는 횟수는 최대 C번 일때,
통나무의 가장 긴 조각을 작게 만들고, 그 길이를 구하기

🔍 풀이 방법

이분탐색 + 누적합 사용
가장 긴 조각의 길이를 이분 탐색으로 탐색하고, 돌리면서 mid를 넘을 때 잘라줌 그리고 한 구간이 그냥 mid보다 크면 무조건 C+1로 바꾸면서 mid 길이 늘림
그리고 자른 횟수가 최대 횟수 C보다 작으면 그냥 제일 앞의 구간 잘라줌

⏳ 회고

아오 걍 너무 어려움.. 다시 풀어도 또 힌트봤다......아오...

@suyeun84 suyeun84 self-assigned this Oct 24, 2025
@suyeun84 suyeun84 added the hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 label Oct 24, 2025
@suyeun84 suyeun84 merged commit fc3fa56 into main Oct 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants