Toggle Numbers Revisited
We have n numbers a1, a2, a3.... aN. Each of these numbers can be either 0 or 1. you have to choose two index i, j (1<=i<=j<=N) and
toggle all the numbers in between it(including numbers at index i and j), such that number of 1's in the given sequence(i.e from a1....aN) is maximized.
P.S: The above operation is applied once only.
your first line contains number of test cases.
Each test case contains,
the first line of test case contains N
the second line of each test case contains n numbers
each test case is separated by a blank line.
output of each test case is the maximum number of 1's after performing the above operation.
1 1 0 0
0 1 0
1 1 0 1 1
Problem Setter : Sumit Kumar
Problem Tester: Akshit Poddar