Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[6주차] 고다혜 #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
jewan100 merged 13 commits into GreatAlgorithm-Study:main from KodaHye:main
Oct 18, 2024
Merged

[6주차] 고다혜 #76

jewan100 merged 13 commits into GreatAlgorithm-Study:main from KodaHye:main
Oct 18, 2024

Conversation

Copy link
Contributor

@KodaHye KodaHye commented Oct 14, 2024

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

엇! 저는 이렇게 조건을 추가하니까 시간이 더 걸리던데! 혹시 더 빨라지셨나요!?

Copy link
Contributor Author

@KodaHye KodaHye Oct 14, 2024
edited
Loading

Choose a reason for hiding this comment

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

image
저는 조건 추가한게 더 짧습니다!

수빈님 코드 중 mx > mx*(4-depth)+total)mx*(4-depth)+total이 부분에서 mx가 아니라 board에서의 최대값을 곱해줘야될 것 같습니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

으악 그러네요!! 보드에서 맥스값을 넣어줘야하는데 그냥 맥스값을 넣었군요 제가... 코드를 좀 더 꼼꼼하게 짜는 연습을 더해야할거같네요!ᅲᅲ 감사합니다!!!

KodaHye reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

혹시! 이슈에 적어주신 블럭이 위치하는 모든 경우의 수가 왜 3 * 3 * 3인지 설명해주실 수 있을까요!?🥹

Copy link
Contributor Author

@KodaHye KodaHye Oct 14, 2024
edited
Loading

Choose a reason for hiding this comment

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

우선 맵의 크기만큼 반복문을 실행하기 때문에 N ×ばつ M을 했고,
(저는 depth를 0부터 시작했기 때문에) depth가 0 ~ 2번째까지 dfs를 반복하고, 반복을 줄이기 위해 상, 좌, 우 방향만 고려했기 때문에 한 지점에 대해 총 3 * 3 * 3가지 경우가 있다고 생각했습니다!

yeahdy reacted with thumbs up emoji
Copy link
Contributor Author

Choose a reason for hiding this comment

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

한 지점에 대해 방향을 상, 하, 좌, 우 모두 고려해도 되지만, 상, 좌, 우로도 충분히 모든 경우의 수를 나타낼 수 있습니다!!

Copy link
Contributor

Choose a reason for hiding this comment

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

아하!!!!! 그렇군요 설명 감사합니다!!👍☺️
방향도 어짜피 for문으로 내려오면서 탐색하니까 3방향만 살피면 되군요!! 근데근데! 그럼 하,좌,우 맞을까요!? 코드도 하로 쓰신거같아서요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아 네! 하, 좌, 우로 했네요!! 근데 상, 좌, 우로 해도 상관 없을 것 같습니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

으어 전 for문타고 내려가면서 봐서 하좌우라고 생각했는데 상일 경우도 왜 상관이 없는걸까요!?ᅲᅲᄐᄏᄏᄐᄐ큐ᅲᅲ
너무 자꾸 질문을 해가지구,,, 자세한건 리뷰때 듣도록 하겠습니다! 답변 감사합니다ᅲᅲ

Copy link
Contributor Author

@KodaHye KodaHye Oct 14, 2024
edited
Loading

Choose a reason for hiding this comment

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



간단히 설명드리면 이 그림에서 (1, 1)에서 하, 하, 우로 가는 경우와 (3, 2)에서 좌, 상, 상으로 가는 경우가 동일한 블럭을 나타내는데요, L자 블럭 이외에도 ᄆ, l, ᅡ 모양 모두 상, 하 중 하나만 사용하면 출발점이 어디인지만 다를 뿐, 모든 모양을 만들 수 있다는 것을 알 수 있습니다!

(이해가 되지 않는 부분이 있다면 계속 질문 주셔도 괜찮습니다!!)

yeahdy, yeongleej, and baexxbin reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

헐!!!!! 완전 친절하게 그림까지 짱입니다....💖 감사합니다!!! 아하 이제 완전 이해갔습니다! 위아래 중 한쪽만 막아줘도 되서 상관없는거였군요!!!! 최고입니다!!!!!!!👍

KodaHye reacted with heart emoji
KodaHye added 12 commits October 15, 2024 10:26
Copy link
Contributor Author

Choose a reason for hiding this comment

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

 if() {
 s = m + 1
 }
 else {
 e = m - 1
 }
}

upperBound 를 하는 경우에 e - 1을 해줘야 됨
lowerBound를 하는 경우에 -1을 하지 않아도 됨

@jewan100 jewan100 merged commit 140d184 into GreatAlgorithm-Study:main Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@baexxbin baexxbin baexxbin left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /