Skip to content

Conversation

@suyeun84
Copy link
Contributor

🧷 문제 링크

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

🧭 풀이 시간

40분

👀 체감 난이도

✏️ 문제 설명

사건의 전후 관계가 주어질 때, 주어진 두 사건의 전후 관계 구하기
(앞에 있는 번호의 사건이 먼저 일어났으면 -1, 뒤에 있는 번호의 사건이 먼저 일어났으면 1, 어떤지 모르면(유추할 수 없으면) 0을 출력)

🔍 풀이 방법

플로이드-워셜 알고리즘 사용
연관관계 주어지면 1로 초기화해두고, 플로이드 알고리즘 사용
INF로 남아있으면 전후관계 모르는거임

⏳ 회고

플로이드-워셜 알고리즘인걸 알면 쉬운데, 몰라서 힌트를 봤다.....

@suyeun84 suyeun84 self-assigned this Jun 16, 2025
@suyeun84 suyeun84 added success 👍 해설을 보지 않고 풀었을 때 hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 labels Jun 16, 2025
@ShinHeeEul ShinHeeEul merged commit 15f28af into main Jun 16, 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