[20251107] BOJ / P5 / 바리스타의 힘 / 한종욱 #1339
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/24439
🧭 풀이 시간
90분
👀 체감 난이도
✏️ 문제 설명
일반적인 문제인데 바라본 방향을 보고 벽을 뚫는다. 최단거리는?
🔍 풀이 방법
벽을 뚫을 때, 해당 방향으로 도착할 수 있는 곳을 모두 queue에 넣는다. 그리고 다익스트라 느낌으로 최단거리를 체크해야 한다. 중복이 될 수도 있거든.
⏳ 회고
근데 시간초과다. 시간초과가 나는 이유도 알겠고, 해당 방향으로 도착할 수 있는 곳을 모두 queue에 넣는 것도 알겠는데, 어떻게 해결할 수 있을지 모르겠다.