Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Mar 18, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
이 메트릭스는 결국 대각선 r=c인 요소를 기준으로 대칭이 되므로, 88행에서
distances[i][j] = distances[j][i] = dist[dirty[j][0]][dirty[j][1]]이렇게 대칭 원소까지 값을 할당하고, 이후 대칭 원소의 값은 탐색하지 않는 방향으로 탐색하면 BFS 횟수를 반으로 줄일 수 있을 것 같습니다!
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.
오 감사합니다 지수님!! 대칭성까지는 생각도 못했는데 배워갑니당~!!