[20250816] BOJ / G2 / 소가 길을 건너간 이유 7 / 이강현#672
Merged
ShinHeeEul merged 1 commit intomainfrom Aug 16, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/14461
🧭 풀이 시간
60분
👀 체감 난이도
✏️ 문제 설명
소가 길을 건너갈거임. 0,0 부터 N-1,N-1로 가야됨.
소가 상하좌우로 이동하는게 길을 건너는 건데, 세 번 건너게 되면 배가 고파서 현재 위치의 풀을 뜯어먹어야 함. 길을 건너는데 걸리는 시간은 T로 고정이지만 풀을 뜯어먹는 시간은 매 위치마다 다름. 최소 시간으로 도착하는 시간을 구하기.
🔍 풀이 방법
다익스트라
갈 위치, 오는데 걸린 시간, 오는데 건너온 길의 개수를 상태로 지정해서 풀자.
상태 정했으면 이젠 그냥 다익스트라임.
⏳ 회고
약간 ez