//输入9(第一行)1 2 5 9 4 3 7 8 5(第二行)输出13 #include<iostream> #include<string> using namespace std; #define max_number 100000 int main(int argc,char* argv[]){ int number,index = 0,index_i,index_j; int a[max_number] = {0}; int max_profit=0, single_profit; cin>&...