Codeforces Round 901 (Div. 1)
E
Jellyfish and Hack
Codeforces
3000
原题
← DF →
翻译中…

It is well known that quick sort works by randomly selecting a 'pivot' element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. But Jellyfish thinks that choosing a random element is just a waste of time, so she always chooses the first element to be the pivot. The time her code needs to run can be calculated by the following pseudocode:

翻译中…

function fun(A)
    if A.length > 0
        let L[1 ... L.length] and R[1 ... R.length] be new arrays
        L.length = R.length = 0
        for i = 2 to A.length
            if A[i] < A[1]
                L.length = L.length + 1
                L[L.length] = A[i]
            else
                R.length = R.length + 1
                R[R.length] = A[i]
        return A.length + fun(L) + fun(R)
    else
        return 0

翻译中…

Now you want to show her that her code is slow. When the function $\mathrm{fun(A)}$ is greater than or equal to $lim$, her code will get $\text{Time Limit Exceeded}$. You want to know how many distinct permutations $P$ of $[1, 2, \dots, n]$ satisfies $\mathrm{fun(P)} \geq lim$. Because the answer may be large, you will only need to find the answer modulo $10^9+7$.

翻译中…

Input

翻译中…

The only line of the input contains two integers $n$ and $lim$ ($1 \leq n \leq 200$, $1 \leq lim \leq 10^9$).

翻译中…

Output

翻译中…

Output the number of different permutations that satisfy the condition modulo $10^9+7$.

翻译中…

Note

翻译中…

In the first example, $P = [1, 4, 2, 3]$ satisfies the condition, because: $\mathrm{fun([1, 4, 2, 3]) = 4 + fun([4, 2, 3]) = 7 + fun([2, 3]) = 9 + fun([3]) = 10}$

翻译中…

Do remember to output the answer modulo $10^9+7$.

翻译中…

样例

Input #1
4 10
Output #1
8
InputCopy OutputCopy
Input #2
8 32
Output #2
1280
InputCopy OutputCopy
题目信息
题号
1874E
时间限制
8 s
内存限制
512 MB
标签
动态规划
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。