You are given an array A containing N integers. The following functions are defined for this array:
Write a program to find l and r such that f3(l,r) is maximum. If there are several values of l and r for which f3(l,r) is maximum, return the one having the largest length. If multiple values still exist, return the one with the smallest l.
Input format
Output format
For each test case, print three space-separated integers denoting l, r, and f3(l,r).
Constraints
1≤T≤5
1≤N≤2000
1≤M,P≤N
0≤A[i]≤109
In the Case 1 : since M=P=2 so we require a sub-array with a length of atleast 2. {3,4} is giving a maximum possible value of f3(l,r).