Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Feb 20, 2025

🧷 문제 링크

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

🧭 풀이 시간

12분

👀 체감 난이도

✏️ 문제 설명

image

  • 위 그림처럼, 각 번호에서 빛을 쏘면 몇 번에 도달하게 되는지 구해보자.

🔍 풀이 방법

[사용한 알고리즘]

  • 구현

  • 빛은 양방향이 동일해서, 1 ~ N+M까지만 빛을 쏴봐도 충분하다.
  • 한 번 빛을 쏠 때 지나는 칸의 개수는 최대 N+M이다.
  • 직접 빛을 이동시켜도 $O((N+M)^2)$에 해결할 수 있다.

⏳ 회고

  • 경계 처리를 잘못했었다..

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