9155: IUPC

内存限制:128 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:0 通过:0

题目描述


The International Unfair Programming Contest (IUPC) is a competition for cheating skills. In this competition, participants are required to solve as many problems as possible by cheating without drawing suspicion\textit{suspicion}suspicion. As is known to all, Nan Xiang Institute of Science and Technology (NXIST) is one of the best cheaters in IUPC. They shot to fame by winning the gold medal in the IUPC Ningxia Railway Station, Yinchuang Site held in May 2020, where they successfully solved 6 problems.


You are the leader of IUPC team in NXIST, and your team is going to participate in IUPC Silk-Road Contest next week. There are nnn problems in this contest, and participants have ttt minutes to solve them. As a master cheater, you already know how to steal solutions submitted by others, so all your team need is to submit the stolen solutions without drawing suspicion\textit{suspicion}suspicion during the contest. Precisely, if problem iii is first solved by other team at the xix_ixi-th minute of the contest, your team will steal the solution immediately\textbf{immediately}immediately and can submit it exactly once\textbf{exactly once}exactly once at any time before the contest ends. However, to avoid suspicion\textit{suspicion}suspicion, you set the following rules for your team:

  •  Your team can submit at most one solution in each minute.
  •  For every kkk-minute time interval [x,x+k−1][x, x+k-1][x,x+k1] (x≥1, x+k−1≤t)(x\ge 1,~ x+k-1\le t)(x1, x+k1t) in the contest, your team can submit at most mmm solutions. Here kkk and mmm are given numbers.

Now you can predict the exact moment when each problem will be solved by other teams, that is, you know when your team can get the solution to each problem. Please calculate the number of different plans for your team to solve all\textbf{all}all problems without drawing suspicion\textit{suspicion}suspicion. Formally, a plan can be denoted as a sequence a1, a2, ..., ata_1,\ a_2,\ ...,\ a_ta1, a2, ..., at, where ai=pa_i=pai=p if your team submits the solution to problem ppp in the iii-th minute, or ai=0a_i=0ai=0 if your team does nothing in the iii-th minute. Two plans are different if the sequences are different.

输入格式


The first line contains four integers n, t, kn,\ t,\ kn, t, k and mmm (1≤n≤131\le n\le 131n13, 1≤t≤3001\le t\le 3001t300, 1≤k≤101\le k\le 101k10, 1≤m≤k1\le m\le k1mk).
The second line contains nnn integers x1, x2, ..., xnx_1,\ x_2,\ ...,\ x_nx1, x2, ..., xn (1≤xi≤t1\le x_i\le t1xit), where xix_ixi denotes the moment when the problem iii is first solved by others.

输出格式


Print an integer - the number of different plans for your team to solve all problems. Since the answer may be very large, you are required to print the value modulo 109+710^9 + 7109+7.

输入样例 复制

4 10 3 2
4 4 5 8

输出样例 复制

156

数据范围与提示

链接:https://ac.nowcoder.com/acm/contest/57364/F
来源:牛客网
For the second example, one of the valid plans can be denoted as follows:

Please note that all people, locations, and events mentioned above are entirely fictional. Any resemblance to actual people, places, or events is purely coincidental.