Skip to content

[BOJ 3197] 백조의 호수 - #72

Merged
sh0723 merged 1 commit into
mainfrom
solve-boj3197
Jun 25, 2026
Merged

[BOJ 3197] 백조의 호수#72
sh0723 merged 1 commit into
mainfrom
solve-boj3197

Conversation

@sh0723

@sh0723 sh0723 commented Jun 25, 2026

Copy link
Copy Markdown
Owner

풀이 요약

  • 백조 이동 BFS와 물 확장 BFS를 분리해 하루 단위로 시뮬레이션했습니다.
  • 백조 BFS에서 현재 물로 이동 가능한 칸은 즉시 탐색하고, 얼음 칸은 다음 날 탐색할 next_swan 큐에 저장했습니다.
  • 물 BFS에서 현재 물과 인접한 얼음을 녹여 다음 날의 물 큐 next_water로 넘겼습니다.
  • 두 번째 백조 위치에 도달하는 순간의 day를 정답으로 출력했습니다.

Link

https://velog.io/@sh0723/PS-%EB%B0%B1%EC%A4%80-3197%EB%B2%88-%EB%B0%B1%EC%A1%B0%EC%9D%98-%ED%98%B8%EC%88%98-1thl6316

문제

  • BOJ 3197
  • 제목: 백조의 호수

Closes #71

@sh0723
sh0723 merged commit 83e7eef into main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOJ 3197] 백조의 호수

1 participant