1646 - 第四届“恒生杯”程序设计大赛决赛 D
Time Limit : 1 Second
Memory Limit : 256 MB
Submission: 163
Solved: 32
- Description
skyjiange get a array A consist of n integers, he want to know what is the maximum absolute sum in all sub-arrays, sub-arrays is some array A[i...j], absolute sum is equal to |sum(A[i...j])|.
- Input
each line contains a integer n(1<=n<=100000), follow by n integers(|A[i]|<=10000).
- Output
print the maximum abs sum.
- sample input
-
3 1 -2 5 3 2 -1 5
- sample output
-
5 6
- hint
- source