Skip to content

Conversation

@suyeun84
Copy link
Contributor

🧷 문제 링크

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

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

각 구간에서 A와 B 사이에 포함되지 않은 부분을 모두 잘라냈을 때 남는 부분들의 길이 총합이 K가 되는 구간 A, B의 최솟값 구하기

🔍 풀이 방법

누적합 + 투포인터 사용
누적합으로 각 지점에 몇개의 구간이 포함되어 있는지 미리 계산해두고,
투 포인터로 start랑 end 옮기면서 길이 총합이 K가 되는 지점 찾음

⏳ 회고

어렵다..

@suyeun84 suyeun84 self-assigned this Oct 17, 2025
@suyeun84 suyeun84 added the hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 label Oct 17, 2025
@suyeun84 suyeun84 merged commit 64b7445 into main Oct 17, 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