[20251216] BOJ / G1 / 벽 부수고 이동하기 3 / 김민진 #1689
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.
🧷 문제 링크
벽 부수고 이동하기 3
🧭 풀이 시간
15분 + 20분
👀 체감 난이도
✏️ 문제 설명
벽 부수고 이동하기 2와 동일한데 낮에만 벽을 부술 수 있음
밤에 대기하는 것도 방문거리가 늘어나는 것으로 간주함
🔍 풀이 방법
처음에는 2의 풀이방법에서 벽이 나오면 낮에는 부수고 밤에는
cnt + 2함근데 오래걸려서
visited를 2차원int배열로 바꾸고 벽을 얼마나 부쉈는지 저장하게 수정더 적은 횟수로 벽을 부수고 칸에 도달한 경우가 있으면 거르는 로직 추가함
⏳ 회고
골1은 확실히 어렵네