Calculate the first 10 terms (starting with n=1) of the sequence a_1=-2, \ a_2=2, and for n \geq 3, \ a_n=a_{n-1}-2a_{n-2} Calculate the first 10 terms (starting with n = 1) of the sequence a_1 = -2, a_2 = 2, \wedg...
英语翻译Problem DescriptionGiven 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 contains