|
||||||||||
Counting spanning treesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 335 Accepted Submission(s): 90 Problem Description Everyone knows spanning trees, especially MST problem. But most of them are not familiar with degree constrained spanning tree. a degree-constrained spanning tree is a spanning tree which the maximum vertex degree is limited to a certain constant d. Given two integers n and d, your task is to count the number of degree constrained spanning trees of a (labeled) complete graph with n vertices. Input Each line contains two integers n, d. 1<=n<=100, 1<=k<=100. Output For each query, output a line which contains only one integer, the number of degree constrained spanning trees of a (labeled) complete graph with n vertices. This number may be very large, so output the answer modulo 20090829. Sample Input
Sample Output
Source | ||||||||||
|