S - Max-Sum-Subarray
因为有图片 复制不全
You are given an array of integers.
You need to find the contiguous subarray of the maximum sum in . The subarray should not contain the number . Please find the maximum sum that is possible.
Note 1: The subarray can also be empty.
Note 2: The answer will fit in 32 bit-signed integer.
Input Format
The first line contains the integer N. The next line contains integers representing the numbers in the array.
Constraints
Output Format
Output a single line representing the maximum sum that can be obtained.
Sample Input