[20250728] BOJ / G5 / 가희와 프로세스 1 / 김수연#562
Merged
ShinHeeEul merged 1 commit intomainfrom Jul 28, 2025
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/21773
🧭 풀이 시간
20분
👀 체감 난이도
✏️ 문제 설명
가희가 1초부터 T초일 때까지, 스케쥴러가 선택한 프로세스의 ID 구하기
🔍 풀이 방법
우선순위 큐 써서 우선순위가 높은 순, id가 작은 순으로 정렬해줌
선택된 프로세스의 우선순위를 1 낮췄다.
⏳ 회고
처음에는 System.out.println을 써서 정답을 출력했는데, 시간 초과가 떠서 BufferedWriter를 이용했다.
귀찮아서 안썼는데 앞으로는 좀 써야겠다..