Returns nCr for the given values of r and n
long long nCr ( int n , int r ) { return fact ( n ) / ( 1LL * fact ( r ) * fact ( n - r ) ) ; } long long number_of_subsequences ( int arr [ ] , int k , int n ) { long long s = 0 ;