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/7569
🧭 풀이 시간
30분-
👀 체감 난이도
✏️ 문제 설명
익은 토마토는 주변의 안익은 토마토를 익게 만듭니다.
여러겹 쌓여있는 박스에서 토마토는 상,하,전,후,좌,우 를 익게 만들 때
모든 토마토를 익게하는데 걸리는 시간을 구하는 문제입니다.
🔍 풀이 방법
BFS를 활용해서 풀었습니다.
일반적인 경우와 다르게 z축이 존재했기 때문에
방향배열을 (좌우), (상하), (전후) 의 3개로 만들어 풀었습니다.
⏳ 회고
BFS를 몇번 거치는지 계산할 때 사용하는 코드의 위치에 따라 결과가 다르게 나오므로 유의해야 할 것 같습니다.