Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT mod = 1e9 + 7 NEW_LINE n = 4 NEW_LINE k = 2 NEW_LINE dp = [ - 1 ] * ( n + 1 ) NEW_LINE ans = solve ( n , k , mod , dp ) NEW_LINE print ( ans ) NEW_LINE DEDENT