If the state is visited then return the answer of this state directly .
if ( dp [ pos ] [ sum ] [ st ] [ check ] [ f ] != - 1 ) : NEW_LINE INDENT return dp [ pos ] [ sum ] [ st ] [ check ] [ f ] NEW_LINE DEDENT lmt = 9 NEW_LINE