c语言编程题.Max SumDescriptionGiven a sequence a[1],a[2],a[3].a[n],your job is to calculate the max sum of a sub-sequence.For example,given (6,-1,5,4,-7),the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.InputThe first line of the input cont
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/14 18:29:07
![c语言编程题.Max SumDescriptionGiven a sequence a[1],a[2],a[3].a[n],your job is to calculate the max sum of a sub-sequence.For example,given (6,-1,5,4,-7),the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.InputThe first line of the input cont](/uploads/image/z/13548393-9-3.jpg?t=c%E8%AF%AD%E8%A8%80%E7%BC%96%E7%A8%8B%E9%A2%98.Max+SumDescriptionGiven+a+sequence+a%5B1%5D%2Ca%5B2%5D%2Ca%5B3%5D.a%5Bn%5D%2Cyour+job+is+to+calculate+the+max+sum+of+a+sub-sequence.For+example%2Cgiven+%286%2C-1%2C5%2C4%2C-7%29%2Cthe+max+sum+in+this+sequence+is+6+%2B+%28-1%29+%2B+5+%2B+4+%3D+14.InputThe+first+line+of+the+input+cont)
c语言编程题.Max SumDescriptionGiven a sequence a[1],a[2],a[3].a[n],your job is to calculate the max sum of a sub-sequence.For example,given (6,-1,5,4,-7),the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.InputThe first line of the input cont
c语言编程题.
Max Sum
Description
Given a sequence a[1],a[2],a[3].a[n],your job is
to calculate the max sum of a sub-sequence.For example,given (6,-1,5,4,-7),
the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.
Input
The first line of the input contains an integer
T(1
c语言编程题.Max SumDescriptionGiven a sequence a[1],a[2],a[3].a[n],your job is to calculate the max sum of a sub-sequence.For example,given (6,-1,5,4,-7),the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.InputThe first line of the input cont
代码最好自己调,给你个数据
1
5 1 2 -4 -5 -6
答案应该是 3 1 2,你的程序会输出2 2 2