#include <stdio.h>#include <stdlib.h>#include <malloc.h>#define MATRIX_LEN 13void PrintMaze(int (*PtrMaze)[MATRIX_LEN]);void RecoveryLocation(int &n,int &m,int &Naddr,int &Maddr);void RightLocation(int &n,int &m);void DownLocation(int &n,int &m);void LeftLocation...
看严蔚敏的数据结构关于稀疏矩阵相乘的一节,觉得有点复杂,自己按照个人理解,写了一个相乘的程序,把相乘后的矩阵先转化成了一维数组,代码如下
自己感觉,貌似比书上的容易理解,而且简单多了,(好像花费的时间和原算法是一样的),各位指点指点
#include <stdio.h>#include <stdlib.h>#define max 12typedef struct{ int i,j; int e;}triple;typedef struct{ triple data[max+1]; int ...