You are given an array A consisting of N elements. Your task is to find the maximal subarray sum after applying the following operation exactly once:
Input format
Output format
Print T lines. For each test case, print a single line representing the maximal subarray sum after applying the operation no more than once.
Constraints
1≤T≤20000
1≤N≤500000
0≤|Ai|≤109∀i∈[1,N]
Sum of N over all test cases does not exceed 106
Initial array A=[-1,4,-1,2],if we choose this subarray [-1,4,-1,2] then modified array will be [-1,4,0,2] and the subarray with maximal sum is [-1,4,0,2] and sum is 4+0+2=6.