Submatrices - Diagonal Elements Sum :
Submatrices - Diagonal Elements Sum : PROBLEM STATEMENT : The program must accept an integer matrix M of size R*C and an integer N as the input. The program must print the sum of diagonal elements of all the N*N non-overlapping submatrices in M as the output. Note: The value of N is always greater than 1 and less than or equal to the minimum value between R and C. Boundary Condition(s): 2 <= R, C <= 50 0 <= Matrix element value <= 1000 Input Format: The first line contains R and C separated by a space. The next R lines, each contains C integer values separated by a space. The (R+2)th line contains N. Output Format: The first line contains the integer values representing the sum of diagonal elements of all N*N non-overlapping submatrices in M. Example Input/Output 1: Input: 5 6 6 3 6 3 2 1 4 5 7 1 3 8 6 9 8 4 3 2 4 1 8 8 9 1 8 1 5 7 9 0 3 Output: 31...