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/17616
🧭 풀이 시간
41분

👀 체감 난이도
✏️ 문제 설명
대회에 N명의 학생이 참가했고, M개의 결과가 존재한다.
각 결과는 A, B로 나타내어지며, A학생이 B학생보다 성적이 좋다는 것을 의미한다.
특정 학생 X에 대해, 이 학생의 가능한 가장 높은 등수와 가장 낮은 등수를 구해보자.
🔍 풀이 방법
[사용한 알고리즘]
방향 그래프 두 개를 하나는 정방향으로, 다른 하나는 역방향으로 만든다.
각각의 그래프에서 X 밑에 존재하는 것들의 개수를 세어주면 답을 구할 수 있다.
⏳ 회고
위상 정렬 문제인 줄 알고 계속 헤맸다.