#### 输入输出格式

##### 输入格式：
• Line 1: Two space-separated integers: N and K
• Lines 2..N+1: Line i+1 contains a single integer that is the serial number of cow i: S_i
##### 输出格式：
• Line 1: A single integer that is the number of ways that N cows can be ‘Mixed Up’. The answer is guaranteed to fit in a 64 bit integer.

#### 输入输出样例

4 1
3
4
2
1

##### 输出样例#1：

2

$$f[i|1<<(z-1)][z]+=f[i][j]$$

Subscribe