Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/11000
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
강의의 개수와 각 강의들의 시작시간, 끝시간이 주어질 때 모든 수업을 가능케하는 최소의 강의실 개수를 구하는 문제입니다.
🔍 풀이 방법
배열을 시작시간, 끝시간 으로 정렬한 후 큐에 넣어가면서 강의실을 새로 배정했습니다.
현재 강의실을 배정해야할 강의의 시작시간이 큐에 남아있는 강의의 끝시간보다 뒤인 경우에는 그 강의실을 재사용 가능하기 때문에
poll 하고 새 강의를 다시 넣어주었습니다.
⏳ 회고
문제 자체를 이해하는데 시간이 좀 걸렸고
일반적인 회의실 배정 같은 그리디 문제로 접근하려다 보니 막혔습니다.
알고리즘 개념 여러개가 섞인 느낌이다 보니 골드 5의 체감보다는 어려웠던 것 같습니다.