Function to count submatrix of size k x k such that sum if greater than or equal to S
def countSubMatrix ( mtrx , k , p ) : NEW_LINE INDENT dp = [ [ 0 for i in range ( dim ) ] for j in range ( dim ) ] NEW_LINE DEDENT