소개글
충북대학교 이충세 교수님의 자료구조 레포트 입니다
목차
없음
본문내용
#include<stdio.h>
#define max 100
#define LV 10000
#define FALSE 0
#define TRUE 1
int cost[max][max];
void inicost(const int n)//거리를 초기화 시킨다.
{
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
if(i==j)
cost[i][j]=0;
else
cost[i][j]=LV;
}
}
cost[0][1]=80; cost[2][4]=200; cost[4][6]=250;
cost[0][2]=40; cost[2][5]=130; cost[5][4]=120;
cost[1][3]=180; cost[3][6]=150; cost[7][6]=80;
cost[2][1]=30; cost[3][7]=90;
}
참고 자료
없음