跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F2454. Yaroslav and Arrangements

    ID: 2460 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 9 上传者: 标签>动态规划挑战难度共享题库Codeforces英文题面题目来源题面语言

Yaroslav and Arrangements

题目描述

E. Yaroslav and Arrangements
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Yaroslav calls an array of r integers a1,a2,...,ar good, if it meets the following conditions: |a1-a2|=1,|a2-a3|=1,...,|ar-1-ar|=1,|ar-a1|=1, at that .

An array of integers b1,b2,...,br is called great, if it meets the following conditions:

  1. The elements in it do not decrease (bibi+1).
  2. If the inequalities 1≤rn and 1≤bim hold.
  3. If we can rearrange its elements and get at least one and at most k distinct good arrays.

Yaroslav has three integers n,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 1000000007 (109+7).

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

Input

The single line contains three integers n, m, k (1≤n,m,k≤100).

Output

In a single line print the remainder after dividing the answer to the problem by number 1000000007 (109+7).

Examples
Input
1 1 1
Output
0
Input
3 3 3
Output
2

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 2087 题。保留原作者与原赛事署名。