K Increasing Subsequence 1
For the given sequence A with n different elements find the number of increasing subsequences with k elements.Input Format
First line contains one integer nOutput Format
Second line contains one integer k
following n lines contains elements of sequence
A[1]
A[2]
....A[n]
Print one number the andwer to questionQuestion Video
1. 1 <= n <= 10^5Sample Input
2. 1 <= k <= 11
3. 1 <= A[i] <= n
4. Output may not fit in 32 bit signed integer
5Sample Output
3
1
2
3
5
4
7
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run