[20250814] BOJ / G5 / 나는 기말고사형 인간이야 / 김수연 #666
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/23254
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
기말고사까지 24 x N 시간만큼 공부할 수 있고,
최저 점수와 1시간 공부할 때마다 올릴 수 있는 점수가 주어질 때,
받을 수 있는 최종 성적의 최댓값 구하기
🔍 풀이 방법
priorityQueue 사용
1시간 공부해서 올릴 수 있는 점수가 높은 순서대로 정렬
이후, 큐에 넣어서 남은 점수와 시간에 대한 while문 반복
⏳ 회고
while문 안쪽을 작성하는데 꽤 걸렸다..