Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Sep 30, 2025

🧷 문제 링크

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

🧭 풀이 시간

120분

👀 체감 난이도

✏️ 문제 설명

정점 N개, 간선 M개인 양방향 단순 연결 그래프가 주어지고, 정점 중 K곳은 할인마트이다.
주어지는 질의 Q개를 처리해보자.

  • 출발 정점이 S, 문을 닫는 할인마트가 C1, ..., Cx일 때 S로부터 문을 연 할인마트까지의 최소 거리?

🔍 풀이 방법

  • 다익스트라

할인마트에서 시작하는 multi-source 다익스트라를 돌리고 각 정점마다 서로 다른 source를 가진 최소 거리 11개를 저장해둔다.
출발 정점으로부터 무조건 11개 중에 답이 존재한다.

⏳ 회고

근데 틀렸다. 왜 틀렸지? 진짜 모르겠다

@oncsr oncsr self-assigned this Sep 30, 2025
@oncsr oncsr added the fail 😢 해설을 보고 풀었거나, 못 풀었을 때 label Sep 30, 2025
@ShinHeeEul ShinHeeEul merged commit 96381de into main Sep 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fail 😢 해설을 보고 풀었거나, 못 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants