#include #include #include #define MAX 8 #define TRUE 1 #define FALSE 0 int cost[][MAX] = {{0,9999,9999,9999,9999,9999,9999,9999}, {300,0,9999,9999,9999,9999,9999,9999}, {1000,800,0,9999,9999,9999,9999,9999}, {9999,9999,1200,0,9999,9999,9999,9999}, {9999,9999,9999,1500,0,250,9999,9999}, {9999,9999,9999,1000,9999,0,900,1400}, {9999,9999,9999,9999,9999,9999,0,1000}, {1700,9999,9999,9999,9999,9999,..
#include #define n 8 #define m 5000 void main() { int data[8][8] = { {0,2,m,m,m,3,m,m}, {2,0,4,1,m,m,m,m}, {m,4,0,m,3,m,m,m}, {m,1,m,0,3,m,2,m}, {m,m,3,3,0,m,m,4}, {3,m,m,m,m,0,6,m}, {m,m,m,2,m,6,0,4}, {m,m,m,m,4,m,4,0}}; int i, j, k, s, e, min; int v[8], distance[8]; // 그래프는 사전에 주어진 그래프를 사용한다. 지금은 예를들어 표기를 한 것임. printf("\n \n"); printf("\n 주어진 그래프에서 출발점과 도착점을 입력하면 최단거리를 알려줍니다."); printf("\n +++..