Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Mar 20, 2025

🧷 문제 링크

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

🧭 풀이 시간

41분
image

👀 체감 난이도

✏️ 문제 설명

대회에 N명의 학생이 참가했고, M개의 결과가 존재한다.
각 결과는 A, B로 나타내어지며, A학생이 B학생보다 성적이 좋다는 것을 의미한다.

특정 학생 X에 대해, 이 학생의 가능한 가장 높은 등수와 가장 낮은 등수를 구해보자.

🔍 풀이 방법

[사용한 알고리즘]

  • DFS

방향 그래프 두 개를 하나는 정방향으로, 다른 하나는 역방향으로 만든다.
각각의 그래프에서 X 밑에 존재하는 것들의 개수를 세어주면 답을 구할 수 있다.

⏳ 회고

위상 정렬 문제인 줄 알고 계속 헤맸다.

@oncsr oncsr self-assigned this Mar 20, 2025
@oncsr oncsr added the success 👍 해설을 보지 않고 풀었을 때 label Mar 20, 2025
@ShinHeeEul ShinHeeEul merged commit 34bfe95 into main Mar 20, 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