帮忙翻译 几段英文

来源:百度知道 编辑:UC知道 时间:2024/05/27 20:16:52
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<=T<=20) which means the number of test cases. Then T lines follow, each line starts with a number N(1<=N<=100000), then N integers followed(all the integers are between -1000 and 1000).

Output
For each test case, you should output two lines. The first line is "Case #:", # means the number of the test case. The second line contains three integers, the Max Sum in the sequence, the start position of the sub-sequence, the end position of the sub-sequence. If there are more than one result, output the first one. Output a blank line between two cases.

问题描述
给出一个数列a[1],a[2],a[3]......a[n], 你的工作是计算这个子数列的最大和。例如,给出数列(6,-1,5,4,-7), 那么这个数列的最大和就是6 + (-1) + 5 + 4 = 14.

输入
第一行包括一个整数T(1<=T<=20),T是指待测数组的个数。然后接下来是T行,每行从N开始(1<=N<=100000), 然后是N个整数(所有的整数在-1000和1000之间)。

输出
每个测试例子,你都需要输出2行结果。第一行显示“例子 # ”,#是指测试例子的数量。第二行包括3个整数,数组的最大和,子数组的开始位置,子数组的结束位置。如果结果多余1个,输出第一个。每2个例子之间输出一行空格。

问题描述
鉴于序列[ 1 ]的[ 2 ]的[ 3 ]......一[ ] ,你的任务是计算最大一笔分序列。例如,鉴于( 6 , -1,5,4 , -7 ) ,马克斯总之在这个序列是6 + ( -1 ) + 5 + 4 = 14 。

输入
第一行中输入包含一个整数吨( 1 “ = Ť ” = 20 )这意味着一些测试用例。则T系列的后续,在每一行开始,数N ( 1 “为N ” = 100000 ) ,然后ñ整数之后(所有整数之间-1000和1000 ) 。

输出
每个测试情况下,您应该输出两行。第一行是“判例# : ” #指一些测试用例。第二行包含三个整数,马克斯琛的顺序,一开始的立场,分序列,最终立场小组序列。如果有一个以上的结果,输出的第一个。输出一个空白行的两起案件。
搜索

问题的描述, 给定一个序列[1],[2],[3]......a[n],你的工作就是去计算出最大的子。比如说,(6 - 7),-1,5,4,在这个序列是最大金额6 +(- 1)+ 5 + 4 = 14。 输入, 第一行输入包含一个整数T(1)和(2)< T < = 20)这意味着测试用例的数目。然后T线接踵而至,线条始于一个号码N(1)和(2)< = N < = 10),然后N整数(所有的整数之后