Skip to content

Conversation

@ksinji
Copy link
Contributor

@ksinji ksinji commented Dec 14, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/7569

🧭 풀이 시간

60분

👀 체감 난이도

✏️ 문제 설명

여러 층으로 이루어진 토마토 상자에서 익은 토마토는 하루가 지나면 상하좌우앞뒤로 인접한 익지 않은 토마토를 익게 만든다.
모든 토마토가 익기까지 걸리는 최소 일수를 구하고, 끝까지 익지 못하는 토마토가 있으면 −1을 출력하라.

🔍 풀이 방법

기존 2차원 bfs에서 z방향을 더해 3차원 bfs
익은 토마토들을 모두 큐에 넣고 bfs 돌리면서 익지 않은 토마토의 개수를 관리
모두 익으면 경과 일수를 출력, bfs 종료 후에도 남아 있으면 −1을 출력

⏳ 회고

처음부터 다 익어있을 경우를 처리해주어야함!!

@ksinji ksinji self-assigned this Dec 14, 2025
@ksinji ksinji added the hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 label Dec 14, 2025
@ShinHeeEul ShinHeeEul merged commit 63a2ea6 into main Dec 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants