> 英语 >
英语翻译
Problem 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
人气:359 ℃ 时间:2020-04-12 14:19:43
解答
问题描述
给出一个数列a[1],a[2],a[3].a[n],你的工作是计算这个子数列的最大和.例如,给出数列(6,-1,5,4,-7),那么这个数列的最大和就是6 + (-1) + 5 + 4 = 14.
输入
第一行包括一个整数T(1
推荐
猜你喜欢
© 2026 79432.Com All Rights Reserved.
电脑版|手机版