int main() { int a[4]={1,-1,-2,1},i; printf("%d\n",maxsumblock(a,1,4,1,0)); for (i=0;i<4;i++) { printf("%d ",a[i]); } }
/* 主程序 */ int main() { int a[6]={1,-2,3,1,-2,3}; printf("%d\n",maxsumblock(a,2,3,1,0)); return 0; }