submatrix sum