-
Notifications
You must be signed in to change notification settings - Fork 4
[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
[6주차] 고다혜 #76
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엇! 저는 이렇게 조건을 추가하니까 시간이 더 걸리던데! 혹시 더 빨라지셨나요!?
There was a problem hiding this comment.
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
에서의 최대값을 곱해줘야될 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
으악 그러네요!! 보드에서 맥스값을 넣어줘야하는데 그냥 맥스값을 넣었군요 제가... 코드를 좀 더 꼼꼼하게 짜는 연습을 더해야할거같네요!ᅲᅲ 감사합니다!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시! 이슈에 적어주신 블럭이 위치하는 모든 경우의 수가 왜 3 * 3 * 3
인지 설명해주실 수 있을까요!?🥹
There was a problem hiding this comment.
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
가지 경우가 있다고 생각했습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
한 지점에 대해 방향을 상, 하, 좌, 우 모두 고려해도 되지만, 상, 좌, 우로도 충분히 모든 경우의 수를 나타낼 수 있습니다!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하!!!!! 그렇군요 설명 감사합니다!!👍
방향도 어짜피 for문으로 내려오면서 탐색하니까 3방향만 살피면 되군요!! 근데근데! 그럼 하,좌,우 맞을까요!? 코드도 하로 쓰신거같아서요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 네! 하, 좌, 우로 했네요!! 근데 상, 좌, 우로 해도 상관 없을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
으어 전 for문타고 내려가면서 봐서 하좌우라고 생각했는데 상일 경우도 왜 상관이 없는걸까요!?ᅲᅲᄐᄏᄏᄐᄐ큐ᅲᅲ
너무 자꾸 질문을 해가지구,,, 자세한건 리뷰때 듣도록 하겠습니다! 답변 감사합니다ᅲᅲ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헐!!!!! 완전 친절하게 그림까지 짱입니다....💖 감사합니다!!! 아하 이제 완전 이해갔습니다! 위아래 중 한쪽만 막아줘도 되서 상관없는거였군요!!!! 최고입니다!!!!!!!👍
BOJ/1000-5000번/DH_2805.java
Outdated
There was a problem hiding this comment.
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을 하지 않아도 됨
No description provided.