A Coder's Quest

0

0 votes
Hard
Problem

In the far far land of NSIT, there was an expert coder named Ajay. He was placed in a company called Boogle and students from every batch knew him. However, he was a very shrewd person! Anyone who'd approach him to become a great coder would be given an array of problems with different level of difficulty. Ajay calls an array of m integers f[1], f[2], ..., f[m] "good", if it meets the following conditions:
1. | f[1] - f[2] | = 1, | f[2] - f[3] | = 1, ... | f[m - 1] - f[m] | = 1, | f[m] - f[1] | = 1
2. f[1] = min(f[i]) for 1 ≤ i ≤ m .

However, to become a master coder, one has to solve problems with different difficulty levels. An "extraordinary mix" is an array of integers g[1], g[2], ..., g[m] fulfills the following conditions:
1. g is a non decreasing array.
2. If m lies between 1 and n (both inclusive) and the inequality 1 ≤ g[i] ≤ x holds.
3. If we can rearrange its elements such that there is at least one and at most r distinct "good" arrays.

Now, you want to become a great coder! You are given with these three magical numbers n, x, r. You need to count the number of distinct "extraordinary mix" arrays. As the answer may be rather large, print the remainder after dividing it by 1000000007 (10^9 + 7). Two arrays are considered distinct if there is a position in which they have distinct numbers.

Input format

The single line contains three integers n, x, r (1 ≤ n, x, r ≤ 100).

Output format

In a single line print the remainder after dividing the answer to the problem by number 1000000007.

Sample test cases

** Input #1**

3 3 3

Output #1

2

Input #2

1 1 1

Output #2

0

Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?