Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

[2023-09-04] sumin #163 #189

Merged
merged 1 commit into from
Sep 5, 2023
Merged

[2023-09-04] sumin #163 #189

merged 1 commit into from
Sep 5, 2023

Conversation

ksumini
Copy link
Contributor

@ksumini ksumini commented Sep 4, 2023

PR Summary

풀이시간: 40분

<input>

  • N: 보드의 크기 (2 ≤ N ≤ 100)
  • K: 사과의 개수 (0 ≤ K ≤ 100)
  • L: 뱀의 방향 변환 횟수 (1 ≤ L ≤ 100)
    • X, C: X초가 끝난 뒤에 C방향으로 90도 회전

<solution>

  • 0: 빈공간, 1: 벽, 2: 사과, 3: 뱀으로 보드를 표현
  • 그 외 나머지 규칙 구현

<시간복잡도>
O(N^2 + K + L)

@ksumini ksumini added the BOJ label Sep 4, 2023
@ksumini ksumini requested a review from Woo-Yeol as a code owner September 4, 2023 08:27
@ksumini ksumini self-assigned this Sep 4, 2023
@ksumini ksumini requested a review from zsmalla as a code owner September 4, 2023 08:27
@ksumini ksumini linked an issue Sep 4, 2023 that may be closed by this pull request
Copy link
Contributor

@limstonestone limstonestone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

벽을 포함한 board 를 만드셔서 value 자체로 다 해결하는 로직이 아주 통일성있고 깔끔한 것 같습니다!!
감사합니다~!

Copy link
Member

@Woo-Yeol Woo-Yeol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

풀이를 잘 설명해주셔서 궁금한 점 없이 잘 마무리 할 수 있었습니다! 고생하셨습니다. 수민님!

Copy link
Contributor

@zsmalla zsmalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

보드와 큐를 모두 활용하셔서 이상적으로 문제를 해결하셨습니다. 큐를 활용하니 꼬리를 줄이는 방식이 직관적이고 더 와닿는 것 같아서 좋았던 풀이였습니다. 고생하셨습니다 수민님!

@ksumini ksumini merged commit 75f4826 into main Sep 5, 2023
@ksumini ksumini deleted the sumin-#163 branch September 5, 2023 15:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BOJ] 뱀
4 participants