问题描述:
c语言 MAX SUM 老是答案错误啊,给的实例测试都是对的,附代码和错误提示,
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.
输入
The first line of the input contains an integer T(1
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.
输入
The first line of the input contains an integer T(1
问题解答:
我来补答展开全文阅读