[20251030] BOJ / G3 / 말이 되고픈 원숭이 / 김수연 #1275
Merged
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/1600
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
원숭이가 이동하려고 할 때, 말과 같이는 K번만 이동할 수 있고 그 이외에는 인접한 칸으로만 이동할 수 있을 때 왼쪽 위에서 아래쪽 아래칸으로 이동하는 최소 이동횟수 구하기
🔍 풀이 방법
bfs이용
visited를 3차원 배열로 만들었다. y, x좌표 그리고 원숭이가 말처럼 이동한 횟수를 저장해두고 방문여부 확인함
⏳ 회고
일반적 bfs같다