Problem C - Contiguous Sums --------------------------- You are given a sequence of N numbers, 0 <= N <= 1000000. Your task is to find the value of the sum of a contiguous subsequence of the given numbers such that this is the maximum of any contiguous subsequence of the given sequence. Input ----- Input consists of multiple lines, one line per case. Each line contains a single positive integer N followed by N integers. The input is terminated by a line containing 0. Output ------ For each case, print one line containing the value you computed. You should not print an output for the last line (with only a 0). Sample Input ------------ 12 1 1 1 1 -1 1 1 1 -1 1 -1 1 12 1 -1 1 -1 1 -1 1 1 -1 1 -1 1 10 6 -5 -4 -3 -2 -1 0 2 2 3 0 Output for Sample Input ----------------------- 6 2 7