Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Feb 25, 2025

🧷 문제 링크

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

🧭 풀이 시간

20분

👀 체감 난이도

✏️ 문제 설명

  • N*M 크기의 격자 칸에 U, R, D, L중 하나가 써있다.
  • 그 칸에 적힌 문자에 따라 상하좌우로 이동한다.
  • 밖으로 탈출 가능한 칸의 개수를 세어보자.

🔍 풀이 방법

[사용한 알고리즘]

  • DFS

  • DFS로 탐색하며, 경계로 나갈 수 있으면 1을 리턴, 아니면 -1을 리턴하게 해서 각 칸 별로 저장해줬다.
  • 마지막에 1인 칸의 수를 세어줬다.

⏳ 회고

  • DFS 너무 헷갈린다 ..

@oncsr oncsr added the success 👍 해설을 보지 않고 풀었을 때 label Feb 25, 2025
@ShinHeeEul ShinHeeEul merged commit e16d06d into main Feb 25, 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