Skip to content
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

[최단경로] 2176255 이서연 #347

Open
wants to merge 30 commits into
base: 2176255-이서연
Choose a base branch
from

Conversation

SeoYeomm
Copy link
Contributor

@SeoYeomm SeoYeomm commented May 28, 2023

인적사항

학번: 2176255
이름: 이서연


과제 제출

기존 제출 : 1238, 2458
추가 제출 : 15685


jk0527 and others added 29 commits May 9, 2023 20:37
@Dong-droid
Copy link
Contributor

Dong-droid commented May 30, 2023

[코드리뷰완료]
수고하셨습니다 😸 완벽 🔅 해서 리뷰할게 없었어요!!

Comment on lines +52 to +60
vector<int> dist_X = dijkstra(X, N, graph); // ( X -> 모든 정점) 최단 시간 저장

int max_time = 0; // 최대 소요시간 초기화
for (int i = 1; i <= N; i++) {
if (i == X) continue; // 모이는 마을은 제외
vector<int> dist_i = dijkstra(i, N, graph); // (학생 위치 i -> X) 최단 시간
max_time = max(max_time, dist_X[i] + dist_i[X]);
// 왕복 시간 = ( X -> 학생 위치 i ) + ( 학생 위치 i -> X )
}
Copy link
Contributor

Choose a reason for hiding this comment

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

💯 👍

Comment on lines +45 to +49
if (i != j && graph[i][j] == INF && graph[j][i] == INF) {
// 둘이 같지 않고 가중치가 INF이면
// i번째 학생과 j번째 학생 사이의 경로가 없음
check = false; // 비교 불가능
break;
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

@jk0527 jk0527 left a comment

Choose a reason for hiding this comment

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

[최단 경로 구현 문제 추가 제출 확인 완료]

추가 제출 확인했습니다!🥰🥰
수고하셨습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants