【文件属性】:
文件名称:#include
文件大小:6KB
文件格式:TXT
更新时间:2012-06-20 18:55:04
#include
#include
#include
#include
#include
typedef struct matrix
{
int row;
int col;
} matrix;
typedef struct minCost
{
int cost;
int mid;
} minCost;
minCost** func(matrix* mt, ssize_t count)
{
int i, j, step, min, temp, mid;
minCost **rows;
rows = (minCost **)malloc(count*(sizeof(minCost*)));
for(i=0;itemp)
{
min=temp;
mid=j+i;
}
}
rows[j][step].cost=min;
rows[j][step].mid=mid;
}
printf("%d, %d\n", rows[0][count-1].cost, rows[0][count-1].mid);
return rows;
}
int rel(minCost **mc, ssize_t count)
{
int i;
for(i=0;i