Function for counting the number of ways to reach ( m , n ) without visiting ( x , y )
int countWays ( int m , int n , int x , int y ) { return nCr ( m + n , m ) - nCr ( x + y , x ) * nCr ( m + n - x - y , m - x ) ; }