C ( i , j ) = ( C ( i - 1 , j ) + C ( i - 1 , j - 1 ) ) % p
else : NEW_LINE INDENT f [ i ] [ j ] = ( ( f [ i - 1 ] [ j ] + f [ i - 1 ] [ j - 1 ] ) % p ) NEW_LINE DEDENT def operations ( arr , n , f ) : NEW_LINE p = 1000000007 NEW_LINE nCr ( n , p - 1 , f ) NEW_LINE arr . sort ( ) NEW_LINE