[20250719] BOJ / G4 / 빙산 / 이준희 #502
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/2573
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
격자맵에 빙산의 높이가 주어지고 1년마다 각 칸의 얼음을 둘러싼 바다만큼 녹을 때(상하좌우)
빙산이 2개 이상으로 분리되는 년수를 구하는 문제입니다
🔍 풀이 방법
bfs를 이용하여 풀이했습니다.
각 시행마다 배열을 순회하며 bfs를 시작하고 bfs를 새로 시작하는 경우에 빙산이 분리되었다고 판단하는 식으로 풀이했습니다.
⏳ 회고
얼음을 녹이면서 bfs를 하면 안되는 등 생각할 부분이 있는 구현문제였던 것 같습니다.