[20250929] BOJ / G5 / 최소 회의실 개수 / 이종환 #1001
Merged
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/19598
🧭 풀이 시간
20분
👀 체감 난이도
✏️ 문제 설명
서준이는 아빠로부터 N개의 회의를 모두 진행할 수 있는 최소 회의실 개수를 구하라는 미션을 받았다. 각 회의는 시작 시간과 끝나는 시간이 주어지고 한 회의실에서 동시에 두 개 이상의 회의가 진행될 수 없다. 단, 회의는 한번 시작되면 중간에 중단될 수 없으며 한 회의가 끝나는 것과 동시에 다음 회의가 시작될 수 있다. 회의의 시작 시간은 끝나는 시간보다 항상 작다. N이 너무 커서 괴로워 하는 우리 서준이를 도와주자.
🔍 풀이 방법
그리디 + PQ라 생각하면 편하다. 지금 현존하는 회의실 중에, 가장 빨리 회의가 끝나는 회의실의 종료 시각을 확인하고, 그것이 지금 시작해야하는 회의보다 일찍끝나면 종료시각을 갱신, 아니라면 새롭게 회의실을 추가하면 된다.
⏳ 회고
내일부턴 진짜 어려운것좀 풀어야지...