-
Notifications
You must be signed in to change notification settings - Fork 4
[10주차] 백제완 #137
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
[10주차] 백제완 #137
Conversation
BOJ/1000-5000번/JW_1613.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.
dist에 진짜 떨어진 거리를 저장하는게 아니라 선후관계를 저장하면 되군요?,,,, 아하,,, !!
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.
이부분 질문이 있는데요!
dist[i][p] == dist[p][j]
i → j 로 경유 할때 왜 dist[i][p]
가 dist[i][j]
로.. 들어가는건가요...!?
i → p와 p → j가 동일하다면 i → j도 동일한 상태를 가짐
이건 이해를 했어요.. 근데 dist[i][j] = dist[i][p];
가 어떤 관계인지 잘 이해가 안가는데 설명해주실수있을까요?🥺
풀어보면 좋은 문제 리스트에 이 문제 넣어놨었는데
제완님 위시리스트 같아서 참고했죠ᄒᄒ
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.
아! dp[i]][j]
에 들어가는 값은 dp[i][p]
이든 dp[p][j]
든 상관 없습니다!
어차피 같은 상태를 저장하고 있기 때문에 둘 중 아무 값이나 넣어준겁니다 ᄒ
p를 경유했는데 dp[i][p]
와 dp[p][j]
가 같은 값을 갖고 있다는 것은 dp[i][j]의 상태를 결정하기에 충분하기 때문입니도
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.
오호 이거 진짜 똑똑한 생각인것 같아요!! 선후관계를 넣는 것!! 😮
No description provided.