Tower Defence

Time Limit: 1000ms
Memory Limit: 131072KB
This problem will be judged on HDU. Original ID: 5779
64-bit integer IO format: %I64d      Java class name: Main

Description

Little White recently likes playing Tower Defence. She wants to make a map. The map is an undirected graph which has n vertices(graph may not connect).The length of each edge is 1.The shortest distance of vertice 1 to any other vertices is not equal to k.She wants to know how many graphs which satisfy all these conditions.If two vertices is disconnected, the distance between them is infinite.

Input

The first line of input is an integer T($1\leq T\leq 10$)
For each test case the first line contains two integers n and k($1\leq k$,$n\leq 60$)

Output

For each testcase , output a line, the answer mod 1,000,000,007

Sample Input

3
3 2
4 2
5 3

Sample Output

6
28
808

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .