本文分享了利用二维动态数组指针做矩阵运算的实现代码。
1. 头文件
// juzhen 2.cpp : Defines the entry point for the console application.
//
#include stdafx.h
#include stdlib.h
#include windows.h
#define OK 0
#define NG -1
typedef struct mat
{
int nRow; /* 行数 */
int
如下所示:
lis = [12,34,456,12,34,66,223,12,5,66,12,23,66,12,66,5,456,12,66,34,5,34]
def test1():
#进行去重
c = []
for i in lis:
if i not in c:
c.append(i)
#进行统计,生成二维列表
b = []
for i in c:
num = 0
for j in range(len(lis)):