数据结构与算法设计 习题2.7题 算法分析

真的是好算法,真厉害

话不多说

#include
#include
#include
#include
#define MAXN 1000
#define MAXN1 1000000
int A[MAXN1],B[MAXN1],C[MAXN1],Used[MAXN1];
  /* 编写printarray函数*/
void printarray(int ARRI[],int len)
{
	for(int i=0;i
费了很大力气终于完成。。。

PO结果

0.001500,0.003100,0.011600,0.060900,;
0.001600,0.006200,0.010900,0.028800,0.049200,0.134300,;
0.001600,0.002300,0.004700,0.010900,0.020300,0.042200,;

目前来看就这样,第三种算法很好!

至于分析,在本子上完成!


你可能感兴趣的:(数据结构和算法设计)