题目描述
Problem Description
You are practicing drawing magic circles on the ground to become the ultimate wizard. The method for drawing a magic circle is as follows:
- Draw \( N \) points equidistantly on a circle, with one of the points being exactly north.
- Connect the points with line segments to form several polygons with at least \( K \) vertices, ensuring no self-intersections.
- Each point must be included in exactly one polygon.
- The drawn polygons must be connected. By connected, we mean that for every pair of polygons \( (a, b) \), there exists a state where polygons \( a \) and \( b \) are connected, which can be defined as:
- Polygons \( a \) and \( b \) intersect at one or more edges.
- There exists a polygon \( c \) such that polygons \( a \) and \( c \) are connected, and polygons \( b \) and \( c \) are connected.
For example, when \( N = 10 \) and \( K = 3 \), you can draw a magic circle as shown below:

The following magic circle is incorrect because the polygons are not connected:

You decided to calculate how many such magic circles can be drawn.
Input Format
The input is given from the standard input in the following format:
\( N \) \( K \)
- The first line contains two integers \( N \) (\( 3 \leq N \leq 400 \)) and \( K \) (\( 3 \leq K \leq N \)) separated by a space.
Output Format
Output the number of magic circles that can be drawn using the described method, modulo \( 1,000,000,007 \) (\( 10^9 + 7 \)). End the output with a newline.
Sample Input and Output
Sample Input #1
6 3
Sample Output #1
8
Sample Input #2
6 4
Sample Output #2
1
Sample Input #3
50 5
Sample Output #3
665400552
Notes/Hints
Scoring
This problem has partial scoring:
- If you solve all test cases where \( N \leq 50 \) and \( K \) satisfies \( N/3 \), you get 30 points.
- If you solve all test cases where \( N \leq 50 \), you get an additional 50 points.
- If you solve all test cases, you get an additional 50 points.
Sample Explanation 1
You can draw 8 different magic circles as shown below:

Sample Explanation 2
Only the hexagon pattern can be drawn.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分