Skip to content

Conversation

@suyeun84
Copy link
Contributor

🧷 문제 링크

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

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

V개의 마을과 E개의 도로의 정보가 주어졌을 때, 도로의 길이의 합이 가장 작은 사이클 구하기

🔍 풀이 방법

플로이드-워셜 이용
플로이드 워셜로 한 마을에서 각 마을까지 가는 최단 경로 저장해두고,
a->b 거리+ b->a 거리를 하고 최단거리로 갱신해줬다.

⏳ 회고

dist[i][j]에서 i == j일 때 배열값을 0으로 초기화를 안해줘서 계속 틀렸다;;;;;;;;;;;;;;;;;;;;;;;;;

@suyeun84 suyeun84 self-assigned this Aug 21, 2025
@suyeun84 suyeun84 added the success 👍 해설을 보지 않고 풀었을 때 label Aug 21, 2025
@ShinHeeEul ShinHeeEul merged commit d905b5b into main Aug 21, 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