Skip to content

[20260301] BOJ / G4 / 유닛 이동시키기 / 이인희#1982

Merged
ShinHeeEul merged 1 commit intomainfrom
LiiNi-coder
Mar 1, 2026
Merged

[20260301] BOJ / G4 / 유닛 이동시키기 / 이인희#1982
ShinHeeEul merged 1 commit intomainfrom
LiiNi-coder

Conversation

@LiiNi-coder
Copy link
Copy Markdown
Contributor

🧷 문제 링크

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

🧭 풀이 시간

50 분

👀 체감 난이도

✏️ 문제 설명

  • 쉬운 BFS 미로찾기인데, 유닛이 AxB 크기의 직사각형

🔍 풀이 방법

  • 그냥 1x1로 취급하여 bfs하고, 장애물 겹치는지 판단할때만 AxB로 취급하여 판단

⏳ 회고

  • AxB의 직사각형 안에 벽이 있는지없는지 O(1)에 어떻게 알수있을까? -> 누적합
  • 해당 문제에선 안써도 풀리지만, 누적합을 통해 시간을 많이 아낄수있음
  • 일반 bfs에서 큐에 넣을때 visited에 넣는게 좋다. 그래야 한 좌표를 중복으로 bfs for루프에서 다시보는 현상이 안생김

@LiiNi-coder LiiNi-coder added the success 👍 해설을 보지 않고 풀었을 때 label Mar 1, 2026
@ShinHeeEul ShinHeeEul merged commit dab4909 into main Mar 1, 2026
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.

2 participants