#include
using namespace std;
#define M 4
#define N 3
#define maxsize 10
typedef struct
{
int r;
int c;
int d;
}TupNode;
typedef struct
{
int rows;
int cols;
int nums;
TupNode data[maxsize];
}TSMatrix;
void CreateMat(TSMatrix &t,int A[M][N]) //从一个二维矩阵创建一个三元组