摘要:
int GetSum(vector<int> a,int N){ int sum=0; if (N>a.size()) { for (auto &i:a) { sum+=i; } } else { for (int i = 0; i < N; i++) { sum+=a[i]; } } return 阅读全文
摘要:
int GetBigger(int x,int y){ int bigger=(x>y?x:y); return bigger;} int GetMax(int a[],int n){ int* start=new int[n]; int* max=new int[n]; start[n-1]=a[ 阅读全文