摘要:
#includeusing namespace std;int Maxsum(int*a, int n);int main(){ int T,n,i,j,count=0,thissum,maxsum,redex1,redex0,redex2; cin >> T; while (T--) { cou... 阅读全文
摘要:
//算法复杂度T=O(n),#includeusing namespace std;int Maxsum(int*a, int n);int main(){ int n, i; int a[100]; while (cin >> n) { for (i = 0; i > a[i]; coutma... 阅读全文
摘要:
//最大子序列和算法1,算法复杂度T=O(n^2)#includeusing namespace std;int find(int*a,int N);clock_t start, stop;int main(){ int a[25]={1,4,-9,5,3,6,7,1,2,4,-8,-1,4,7,-... 阅读全文