Problem E. Duff in Beach

时间限制 2000 ms   内存限制 256 MB

While Duff was resting in the beach, she accidentally found a strange array b0, b1, ..., bl - 1 consisting of l positive integers. This array was strange because it was extremely long, but there was another (maybe shorter) array, a0, ..., an - 1 that b can be build from a with formula: bi = aimodn where amodb denoted the remainder of dividing a by b.

Duff is so curious, she wants to know the number of subsequences of b like bi1, bi2, ..., bix (0 ≤ i1 < i2 < ... < ix < l), such that:

  • 1 ≤ x ≤ k
  • For each 1 ≤ j ≤ x - 1,
  • For each 1 ≤ j ≤ x - 1, bij ≤ bij + 1. i.e this subsequence is non-decreasing.

Since this number can be very large, she want to know it modulo 109 + 7.

Duff is not a programmer, and Malek is unavailable at the moment. So she asked for your help. Please tell her this number.

输入数据

The first line of input contains three integers, n, l and k (1 ≤ n, k, n × k ≤ 106 and 1 ≤ l ≤ 1018).

The second line contains n space separated integers, a0, a1, ..., an - 1 (1 ≤ ai ≤ 109 for each 0 ≤ i ≤ n - 1).

输出数据

Print the answer modulo 1 000 000 007 in one line.

样例

样例说明

In the first sample case, d3efbebbd42cfe3d2dbf0fa00bb9bd96f0c82946.png. So all such sequences are: 2f1a184d6d2c19fe08dc2ee379b6771f3dda6830.png, 21eca0ea1757903a6ca9da32f69bfd38381c691c.png, d7bc28124edccfad2726903c0602a42947790453.png, 1500f524726eb4a3990d99eb229acf9680d8eaf0.png, 1fad1297234aac3399789ff08c5a97f1a1524f80.png, 4c94cceb7f4ccdf9de262f8b435874a222b632cd.png, 0bdb3b2f17e237a6d27930411f1f03f57caaa3e0.png, 9255e13e81f8cd8bedad1201420689a698771d33.png, 485308e3ec803758ba43b637b2e06a92808b6a74.png and ad6e9a6e9111d0b0c1c78c97a00e5860a791132a.png.

提交

请先 登录

© 2025 FAQs Contact About