Same as above case for ' q ' and 'r
' NEW_LINE INDENT elif ( last == 1 ) : NEW_LINE INDENT dp [ p ] [ q ] [ r ] [ last ] = ( countWays ( p , q - 1 , r , 0 ) + countWays ( p , q - 1 , r , 2 ) ) ; NEW_LINE DEDENT else : NEW_LINE DEDENT