human
Number of ways to arrange 2 * N persons on the two sides of a table with X and Y persons on opposite sides | Function to find factorial of a number.
Function to find nCr.
Function to find the number of ways to arrange 2 * N persons.
Driver code.
Function call"
Solution in Python:
 Write me a code to number of ways to arrange 2 * N persons on the two sides of a table with X and Y persons on opposite sides and the other steps required?
assistant
#Here is code to number of ways to arrange 2 * N persons on the two sides of a table with X and Y persons on opposite sides and the other steps required.
 def factorial ( n ) :
	if ( n <= 1 ) :
		return 1 ;
	return n * factorial ( n - 1 ) ;
def nCr ( n , r ) :
	return ( factorial ( n ) / ( factorial ( n - r ) * factorial ( r ) ) ) ;
def NumberOfWays ( n , x , y ) :
	return ( nCr ( 2 * n - x - y , n - x ) * factorial ( n ) * factorial ( n ) ) ;
n , x , y = 5 , 4 , 2 ;
print ( int ( NumberOfWays ( n , x , y ) ) ) ;