Skip to content

Conversation

@lkhyun
Copy link
Contributor

@lkhyun lkhyun commented Jul 27, 2025

🧷 문제 링크

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

🧭 풀이 시간

15분

👀 체감 난이도

✏️ 문제 설명

프로세스들을 스케쥴러가 고르는 문제
각 프로세스들은 id, 남은 시간, 우선순위를 가짐.
스케쥴러는 프로세스를 우선순위가 높은 것부터, 같다면 id가 낮은 것부터 1초 실행하고 시간이 남았다면 다시 고려대상으로 둠.
이때 T초동안 선택된 프로세스의 id를 출력

🔍 풀이 방법

우선순위 큐
comparator만 설정하면 풀리는 ez 문제
실행한 프로세스를 제외한 나머지 우선순위를 1씩 올린다고 어그로 끄는거를 실행한 프로세스의 우선순위를 1 낮추는 걸로 해결함.

⏳ 회고

ez

@lkhyun lkhyun self-assigned this Jul 27, 2025
@lkhyun lkhyun added the success 👍 해설을 보지 않고 풀었을 때 label Jul 27, 2025
@ShinHeeEul ShinHeeEul merged commit 609a604 into main Jul 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants