Skip to content

[BOJ 1103] 게임 - #253

Merged
sh0723 merged 2 commits into
mainfrom
solve-boj1103
Sep 17, 2026
Merged

sh0723 merged 2 commits into
mainfrom
solve-boj1103

Conversation

@sh0723

@sh0723 sh0723 commented Sep 17, 2026

Copy link
Copy Markdown
Owner

풀이 요약

  • DFS로 현재 칸에서 이동 가능한 네 방향을 탐색하고, 각 칸에서 게임을 계속할 수 있는 최대 이동 횟수를 메모이제이션합니다.
  • 현재 재귀 경로에서 같은 칸을 다시 방문하면 사이클이므로 무한 이동으로 판정해 -1을 출력합니다.
  • 각 상태를 한 번씩 계산하므로 시간 복잡도는 O(NM), 공간 복잡도는 O(NM)입니다.

Link

https://velog.io/@sh0723/PS-%EB%B0%B1%EC%A4%80-1103%EB%B2%88-%EA%B2%8C%EC%9E%84

문제

  • BOJ 1103
  • 제목: 게임

Closes #252

@sh0723
sh0723 merged commit 60319c2 into main Sep 17, 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 1103] 게임

1 participant