名次解释:
在线处理算法:“在线”的意思是指每输入一个数据就进行即时处理,在任 何一个地方中止输入,算法都能正确给出当前的解。
典型例题(HDU 1003):(网址:点击打开链接)
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