CF301E.Yaroslav and Arrangements

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Yaroslav calls an array of rr integers a1,a2,...,ara_{1},a_{2},...,a_{r} good, if it meets the following conditions: a1a2=1,a2a3=1,...,ar1ar=1,ara1=1|a_{1}-a_{2}|=1,|a_{2}-a_{3}|=1,...,|a_{r-1}-a_{r}|=1,|a_{r}-a_{1}|=1 , at that .

An array of integers b1,b2,...,brb_{1},b_{2},...,b_{r} is called great, if it meets the following conditions:

  1. The elements in it do not decrease (bi<=bi+1)(b_{i}<=b_{i+1}) .
  2. If the inequalities 1<=r<=n1<=r<=n and 1<=bi<=m1<=b_{i}<=m hold.
  3. If we can rearrange its elements and get at least one and at most kk distinct good arrays.

Yaroslav has three integers n,m,kn,m,k . He needs to count the number of distinct great arrays. Help Yaroslav! As the answer may be rather large, print the remainder after dividing it by 10000000071000000007 (109+7)(10^{9}+7) .

Two arrays are considered distinct if there is a position in which they have distinct numbers.

输入格式

The single line contains three integers nn , mm , kk (1<=n,m,k<=100)(1<=n,m,k<=100) .

输出格式

In a single line print the remainder after dividing the answer to the problem by number 10000000071000000007 (109+7)(10^{9}+7) .

输入输出样例

  • 输入#1

    1 1 1
    

    输出#1

    0
    
  • 输入#2

    3 3 3
    

    输出#2

    2
    
首页