Skip to content

Conversation

@suyeun84
Copy link
Contributor

@suyeun84 suyeun84 commented Aug 4, 2025

🧷 문제 링크

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

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

학부에 개설된 모든 전공과목을 들으려고 함.
어떤 과목들은 선수과목이 있어서 선수과목 조건을 반드시 지켜야할 때, 모든 과목에 대해 각 과목을 최소 몇 학기에 이수할 수 있는지 출력

🔍 풀이 방법

bfs 이용한 위상 정렬 사용
선수과목이 몇개 있는지 degree라는 배열에 저장하고,
degree에 저장된 값이 0인 과목부터 이수함.
이후, 하나씩 줄여나가면서 degree가 0이 된 과목을 이수할 수 있는 학기 저장해둠

⏳ 회고

오랜만에 푸니까 헷갈린다..

@suyeun84 suyeun84 self-assigned this Aug 4, 2025
@suyeun84 suyeun84 added success 👍 해설을 보지 않고 풀었을 때 hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 labels Aug 4, 2025
@ShinHeeEul ShinHeeEul merged commit 5c2e28f into main Aug 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants