Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Sep 22, 2025

🧷 문제 링크

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

🧭 풀이 시간

10분

👀 체감 난이도

✏️ 문제 설명

N*M 격자의 각 칸 (i,j)의 높이는 h[i][j]이다.
상하좌우로 이동이 가능하며, 이동 간 높이 차이에 따라 소요 시간이 다르다.

  • 높이 차이가 나지 않는 칸으로 이동할 때, 1분의 시간이 소모된다.
  • 높이가 더 높은 칸으로 이동할 때, 두 칸의 높이 차이 1당 a분의 시간이 소모된다.
  • 높이가 더 낮은 칸으로 이동할 때, 두 칸의 높이 차이 1당 b분의 시간이 소모된다.

시작점은 주어지고 도착점은 높이가 가장 높은 곳일 때, 둘 사이의 최소 이동 시간을 구해보자.

🔍 풀이 방법

  • 다익스트라

기본 다익스트라와 똑같이 짰다.

⏳ 회고

골3은 높은 것 같음

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