计算机 编程 C语言
- 提问者网友:心如荒岛囚我终老
- 2021-04-20 16:20
- 五星知识达人网友:迟山
- 2021-04-20 17:52
- 1楼网友:野味小生
- 2021-04-20 18:41
这是你要的译文:
至于曼努埃尔想快速致富,没有太多的工作,他决定在赌博生涯。 Initially, he plans to study the gains and losses of players, so that, he can identify patterns of consecutive wins and elaborate a win-win strategy.最初,他计划研究的成果和球员的损失,因此,他可以找出连胜模式和拟订一项双赢战略。 But Manuel, as smart as he thinks he is, does not know how to program computers.但曼努埃尔,一样聪明,他认为他是,不知道如何程序的计算机。 So he hired you to write programs that will assist him in elaborating his strategy.因此,他雇用了你写的程序,将协助他制定他的战略。 Your first task is to write a program that identifies the maximum possible gain out of a sequence of bets.您的第一个任务是编写一个程序,确定出的最高的投注顺序可能获得的利润。 A bet is an amount of money and is either winning (and this is recorded as a positive value), or losing (and this is recorded as a negative value).阿投注是金钱,是可以赢得(这是一项积极的货值录),或失去(这是为负值记录)。 Input The input set consists of a positive number N <= 10000 , that gives the length of the sequence, followed by N integers.输入输入设置包括一个积极的数目N“= 10000,使该序列的长度,然后由N整数。 Each bet is an integer greater than 0 and less than 1000.每个投注是大于0的整数,小于1000。 The input is terminated with N = 0.输入终止与N = 0。 Output For each given input set, the output will echo a line with the corresponding solution.对于每一个给定的输出输入设置,输出将回声与相应的解决方案路线。 If the sequence shows no possibility to win money, then the output is the message "Losing streak."如果序列显示没有可能赢得的钱,那么输出的消息“连败。” Sample Input: 5 12 -4 -10 4 9 3 -2 -1 -2 0 Sample Output: The maximum winning streak is 13.示例输入:5 12 -4 -10 4 9 3 -2 -1 -2 0示例输出:最高连胜纪录是13。 Losing streak.连败。