This repository was archived by the owner on Mar 18, 2024. It is now read-only.
[2023-09-04] sumin #162#188
Merged
Merged
Conversation
Closed
zsmalla
approved these changes
Sep 4, 2023
Contributor
zsmalla
left a comment
There was a problem hiding this comment.
주석과 코드가 깔끔해서 이해하기 어렵지 않았습니다. 고려할 점을 남겼으니 검토 부탁드리겠습니다! 고생하셨습니다 수민님!
Contributor
There was a problem hiding this comment.
이 메트릭스는 결국 대각선 r=c인 요소를 기준으로 대칭이 되므로, 88행에서
distances[i][j] = distances[j][i] = dist[dirty[j][0]][dirty[j][1]]
이렇게 대칭 원소까지 값을 할당하고, 이후 대칭 원소의 값은 탐색하지 않는 방향으로 탐색하면 BFS 횟수를 반으로 줄일 수 있을 것 같습니다!
Contributor
Author
There was a problem hiding this comment.
오 감사합니다 지수님!! 대칭성까지는 생각도 못했는데 배워갑니당~!!
limstonestone
approved these changes
Sep 4, 2023
Contributor
limstonestone
left a comment
There was a problem hiding this comment.
뭐라 피드백드리기 어려울 정도로 깔끔하고 정석적으로 풀이해내신 것 같습니다 .. ㅎ
변수명, 주석들도 한 눈에 잘 들어오네요 감사합니다 ~!
Woo-Yeol
approved these changes
Sep 4, 2023
Member
Woo-Yeol
left a comment
There was a problem hiding this comment.
수민님 문제풀이도 당연히 말할 것 도 없지만 시간 복잡도 계산도 잘해주셔서 너무 감사합니다. 고생하셨습니다 수민님!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
PR Summary
풀이시간: 50분
<input>
<solution>
<시간복잡도>
O(W * H * 10) + O(더러운 칸의 개수! * 더러운 칸의 개수) = 최대 36,292,000의 연산횟수