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

[최단경로] 2176251이민경 #361

Open
wants to merge 1 commit into
base: 2176251-이민경
Choose a base branch
from

Conversation

Minlee01
Copy link

인적사항

학번: 2176251
이름: 이민경


과제 제출

기존 제출 : 1238
추가 제출 :


@Minlee01 Minlee01 changed the base branch from main to 2176251-이민경 May 30, 2023 10:23
@Dong-droid
Copy link
Contributor

코드리뷰완료
수고하셨습니다 😸

Comment on lines +52 to +63

vector<int> forward_dist = dijkstra(x, n, graph); // X에서 각 마을로 가는 최단 시간
vector<int> reverse_dist = dijkstra(x, n, reverse_graph); // 각 마을에서 X로 돌아오는 최단 시간

int max_time = 0;
for (int i = 1; i <= n; i++) {
if (i == x) continue;
int total_time = forward_dist[i] + reverse_dist[i]; // 왕복시간 계산
max_time = max(max_time, total_time);
}

cout << max_time << endl;
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

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.

2 participants