C. Subsequences
time limit per test
1 second
memory limit per test
256 megabytes
output
standard output
对于具有n个不同元素的给定序列,找出具有k+1个元素的递增子序列的数量。保证答案不大于8*1e18。
输入
第一行包含两个整数值n和k(1≤n≤1e5,0≤k≤10)−序列长度和递增子序列中元素的数量。
接下来的n行包含一个整数ai(1≤ai≤n),每个−序列元素。所有值ai都不同。
输出
打印一个整数–问题的答案。
For the given sequence with n different elements find the number of increasing subsequences with k+1 elements. It is guaranteed that the answer is not greater than 8·1018.
Output
Print one integer − the answer to the problem.