Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Feb 6, 2025

🧷 문제 링크

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

🧭 풀이 시간

10분

👀 체감 난이도

✏️ 문제 설명

격자 그래프의 각 칸은 초원, 산, 빙판 중 하나이고, 어떤 칸에는 늑대가 살고 있다.

늑대는 빙판 위에선 미끄러지고, 산으로는 갈 수 없다고 할 때, 늑대로부터 안전한 칸을 P로 대체해서 출력해야 한다.

🔍 풀이 방법

기본 BFS인데, 4방향 좌표 구할 때 빙판이면 그 방향으로 미끄러지도록 while문을 써주자.

⏳ 회고

미끄러지는 구현이 재밌다

@oncsr oncsr added the success 👍 해설을 보지 않고 풀었을 때 label Feb 6, 2025
@ShinHeeEul ShinHeeEul merged commit 2888b5a into main Feb 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants