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/05/11 14:48:41
c语言编程题.MaxSumDescriptionGivenasequencea[1],a[2],a[3].a[n],yourjobistocalculatethemaxsumofasub-sequen

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