Skip to content

Conversation

@JHLEE325
Copy link
Contributor

🧷 문제 링크

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

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

해리와 친구들의 방의 위치와 각 방 사이 통로의 길이가 주어졌을 때
친구들이 모두 만날 수 있는 방 중 이동거리의 합이 가장 작은 경우를 구하는 문제입니다.

🔍 풀이 방법

다익스트라를 이용해서 풀었습니다.
K개의 친구가 N개의 방 중에서 만나기 때문에 dist 배열을 이중배열로 dist[K][N+1]로 하여 각 사람이 다른 방으로 가는 모든 값을 다익스트라로 계산하였습니다.

⏳ 회고

문제 자체는 플로이드-워셜이 더 맞는 것 같은데 뇌가 플며드는 것 같아서 억지 다익스트라 했습니다.

@JHLEE325 JHLEE325 added the success 👍 해설을 보지 않고 풀었을 때 label Oct 19, 2025
@ShinHeeEul ShinHeeEul merged commit d8453af into main Oct 19, 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