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

김지훈 : boj 11403 경로 찾기 #247

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hoonti06
Copy link

@hoonti06 hoonti06 commented May 4, 2021

🅰 설계

  • floyd-warshall 알고리즘을 활용하여 경유지 k를 거쳐 i에서 j까지 갈 수 있는 지를 확인합니다.
for (int k = 0; k < N; k++) {
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (edge[i][k] == 0 || edge[k][j] == 0)
        continue;
      edge[i][j] = 1;
    }
  }
}

✅ 후기

  • 쌤에게 배운 경출도를 적용했습니다.
  • 3중 for문의 정확한 작용 방식이 기억이 나지 않습니다.

@hoonti06 hoonti06 added BOJ Baekjoon 플로이드와샬 Floyd–Warshall labels May 4, 2021
@hoonti06 hoonti06 self-assigned this May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BOJ Baekjoon 플로이드와샬 Floyd–Warshall
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant