Problem2218--Subsequences

2218: Subsequences

Time Limit: 2 Sec  Memory Limit: 256 MB
Submit: 0  Solved: 0
[Submit] [Status] [Web Board] [Creator:]

Description

time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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.

Input

First line contain two integer values n and k (1≤n≤105,0≤k≤10) − the length of sequence and the number of elements in increasing subsequences.

Next n lines contains one integer ai (1≤ain) each − elements of sequence. All values ai are different.

Output

Print one integer − the answer to the problem.

Examples
Input
5 2
1
2
3
5
4
Output
7

Source/Category