The Battle of Chibi

题意翻译

$T$ 组数据,在长度为 $n$ 的数列 $a$ 中,求出长度为 $m$ 的**严格上升子序列**的个数。答案对 $10^9 + 7$ 取模。 举个例子: $n = 5$,$m = 3$,$a$ 为 `1 3 2 4 5`。 那么符合条件的序列就有:`1 3 4`,`1 3 5`,`1 2 4`,`1 2 5`,`1 4 5`,`3 4 5`,`2 4 5`。最终答案就是 $7$。 数据范围: $1 \le m \le n \le 1000$,$1 \le a_i \le 10^9$,$1 \le T \le 100$。

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4866 [PDF](https://uva.onlinejudge.org/external/129/p12983.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12983/2c81a6fe1132b701952f63c78a9a7d2e6b9e5ec1.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12983/52880c5074f5f4a6fdfae251027312d6918f944a.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12983/7c1e7c5f4a868fbee2074a74bbef857cb077861d.png)

输入输出样例

输入样例 #1

2
3 2
1 2 3
3 2
3 2 1

输出样例 #1

Case #1: 3
Case #2: 0