#includeusingnamespacestd;#defineM4#defineN3#definemaxsize10typedefstruct{intr;intc;intd;}TupNode;typedefstruct{introws;intcols;intnums;TupNodedata[maxsize];}TSMatrix;voidCreateMat(TSMatrix&t,intA[M][N])//从一个二维矩阵创建一个三元组