Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Dec 6, 2025

🧷 문제 링크

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

🧭 풀이 시간

10분

👀 체감 난이도

✏️ 문제 설명

N개의 역과 M개의 하이퍼튜브가 있다.
하이퍼튜브 하나는 역 K개를 서로 연결한다.
1번 역에서 N번 역으로 가는데 방문하는 최소 역의 수를 구해보자.

🔍 풀이 방법

정점 1부터 N까지는 원래의 역, N+1부터 N+M까지는 i번째 하이퍼튜브를 나타내는 가상의 정점으로 생각하고 0-1 BFS로 최단 거리를 구했다.

⏳ 회고

최근에 본 문제들 중 가장 교육적인 문제인 듯

@oncsr oncsr added the success 👍 해설을 보지 않고 풀었을 때 label Dec 6, 2025
@ShinHeeEul ShinHeeEul merged commit 38a6672 into main Dec 6, 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