반응형 플로이드워셜1 [백준/Python] 11404번 플로이드 문제https://www.acmicpc.net/problem/11404 소스코드import sysinput = sys.stdin.readlinen = int(input())m = int(input())graph = [[1e11 for _ in range(n + 1)] for _ in range(n + 1)]for i in range(n): graph[i + 1][i + 1] = 0for i in range(m): a, b, c = map(int, input().split()) graph[a][b] = min(graph[a][b], c)for k in range(1, n + 1): for i in range(1, n + 1): for j in range(1, n + 1):.. 2024. 11. 25. 이전 1 다음 728x90 반응형