题目描述
Problem Description
Find the number of undirected graphs with $ N $ vertices that satisfy all of the following conditions, modulo $10^9\ +\ 7$.
- The $ N $ vertices are numbered from $ 1 $ to $ N $.
- The graph has no self-loops or multiple edges (it does not need to be connected).
- If the length of every edge is $ 1 $, the shortest distance between vertices $ 1 $ and $ 2 $ is $ D $.
Input Format
The input is given from the standard input in the following format:
$ N $ $ D $
Output Format
Output the number of graphs that satisfy all the conditions, modulo $10^9\ +\ 7$.
Sample Input and Output
Sample Input #1
4 3
Sample Output #1
2
Sample Input #2
4 2
Sample Output #2
14
Sample Input #3
30 15
Sample Output #3
313862829
Notes/Hints
Notes
Two graphs $ G_1 $ and $ G_2 $ are considered different if and only if:
- There exists an integer pair $ (i, j) $ $(1\ \leq\ i\ <\ j\ \leq\ N)$ such that the edge connecting vertices $ i $ and $ j $ exists in only one of $ G_1 $ or $ G_2 $.
Constraints
- $1\ \leq\ D\ <\ N\ \leq\ 30$
- $ N $ and $ D $ are integers.
Sample Explanation 1
The graphs satisfying the conditions are as follows: ![[MATH0]](https://img.atcoder.jp/soundhound2018-summer-final/df4dffb7f2140b22a6c7ccc86f6c9cf9.png)
Sample Explanation 3
Please note the modulo $(10^9\ +\ 7)$.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
4 3
样例输出
2