https://www.acmicpc.net/problem/1504 1504번: 특정한 최단 경로 첫째 줄에 정점의 개수 N과 간선의 개수 E가 주어진다. (2 ≤ N ≤ 800, 0 ≤ E ≤ 200,000) 둘째 줄부터 E개의 줄에 걸쳐서 세 개의 정수 a, b, c가 주어지는데, a번 정점에서 b번 정점까지 양방향 길이 존 www.acmicpc.net 다익스트라를 여러 번 사용해 풀 수 있습니다. #include #include #include #include #include using namespace std; /* 다익스트라를 세번 사용 */ // 다익스트라 int dijkstra(array tree, int N, int start, int end) { // 시스템상 최대 거리 int max_di..