摘要: #include<iostream>using namespace std;const int MAX=100000;const int LEN=100;//按从小到大的排列合并数组A,其中A的p~q和q+1~r部分是已经排好序的 int merge(int A[LEN],int p,int q,int r)//p,q,r是数组下标 { int n1=q-p+1; int n2=r-q; int L[LEN],R[LEN];//设置一个左右数组 for(int i=0;i<n1;i++)//将A的p~q部分赋给左数组 L[i]=A[p+i]; for(i=0;i<n2; 阅读全文
posted @ 2013-03-02 19:51 MinZhang 阅读(365) 评论(0) 推荐(0) 编辑