遞歸,分治法,最大連續子數組

最大值情況只有三種可能: 1.左邊一半之中取的 2.右邊一半之中取的 3.中間連續的取得 #include <iostream> #include<bits/stdc++.h> using namespace std; int f(int *a,int from,int to); int main() {     int object[10]={1,-2,3,10,-4,7,2,-5};//目標數
相關文章
相關標籤/搜索