代码:
#include <iostream>
#include<malloc>
#include<cstdio>
using namespace std;
#define M 4
#define N 4
#define MaxSize 100
typedef int ElemType;
typedef struct
{
int r;
int c;
ElemType d;///元素值
} TupNode; ///三元组定义
typedef struct
{
int rows;
int cols;
int nums;
TupNode data[MaxSize];