Comments

I can understand that from i till length t[i] we have positive sum.But this positive sum of length t[i] should be positive for all subarrays of length t[i].. how to check that within time constraints..as there may be many t[i]>0...?

great explanation..I understood till here ..now how to find ans from t[i]... logic to find ans from t[]..?

I could not understand the part of x<0. and whats t[i]. Can you please elaborate a little?

Is there something wrong with the time complexity in D part.

n=order of 10^5

we are able to solve in nlogn

and test cases=order 10^4

But time limit is 1 sec which only supports 10^8... so why is the solution not giving tle ?

Can someone tell me whats wrong in this solution 79969659 This is for div 2 C.. giving wrong answer on test case 9.. but when I copy the testcase 9 and run it ..it gives correct answer..How?

Test case 9

2

199999 200000