Given an integer t and a 2 D array of random integers in which all elements arranged in increasing order in every row and column we need to find the sum of elements in all possible square submatices of the given matrix such that the sum is greater than or equal to t ?
I tried using naive approach but ended up getting tle
please help me to know the optimal method of solving this question or if there are any similar problems please let me know
Thank you.