Function for counting the number of ways to reach ( m , n ) without visiting ( x , y )
def countWays ( m , n , x , y ) : NEW_LINE INDENT return ( nCr ( m + n , m ) - nCr ( x + y , x ) * nCr ( m + n - x - y , m - x ) ) NEW_LINE DEDENT