2018 牛客网暑期ACM多校训练营(第一场) E Removal (DP)

时间:2023-03-08 20:41:45
2018 牛客网暑期ACM多校训练营(第一场) E	Removal (DP)

Removal

链接:https://ac.nowcoder.com/acm/contest/139/E来源:牛客网

题目描述

Bobo has a sequence of integers s1, s2, ..., sn where 1 ≤ si ≤ k.

Find out the number of distinct sequences modulo (109+7) after removing exactly m elements.

输入描述:

The input consists of several test cases and is terminated by end-of-file.The first line of each test case contains three integers n, m and k.The second line contains n integers s1, s2, ..., sn.

输出描述:

For each test case, print an integer which denotes the result.

示例1

输入

[复制](javascript:void(0)