Codeforces Round 431 (Div. 1)
D
Shake It!
Codeforces
2900
原题
← CE →
翻译中…

A never-ending, fast-changing and dream-like world unfolds, as the secret door opens.

翻译中…

A world is an unordered graph $*G*$, in whose vertex set $*V*(*G*)$ there are two special vertices $*s*(*G*)$ and $*t*(*G*)$. An initial world has vertex set ${*s*(*G*), *t*(*G*)}$ and an edge between them.

翻译中…

A total of $*n*$ changes took place in an initial world. In each change, a new vertex $*w*$ is added into $*V*(*G*)$, an existing edge $(*u*, *v*)$ is chosen, and two edges $(*u*, *w*)$ and $(*v*, *w*)$ are added into $*E*(*G*)$. Note that it's possible that some edges are chosen in more than one change.

翻译中…

It's known that the capacity of the minimum $*s*$-$*t*$ cut of the resulting graph is $*m*$, that is, at least $*m*$ edges need to be removed in order to make $*s*(*G*)$ and $*t*(*G*)$ disconnected.

翻译中…

Count the number of non-similar worlds that can be built under the constraints, modulo $10^{9} + 7$. We define two worlds similar, if they are isomorphic and there is isomorphism in which the $*s*$ and $*t*$ vertices are not relabelled. Formally, two worlds $*G*$ and $*H*$ are considered similar, if there is a bijection between their vertex sets image, such that:

翻译中…
  • $*f*(*s*(*G*)) = *s*(*H*)$;
  • $*f*(*t*(*G*)) = *t*(*H*)$;
  • Two vertices $*u*$ and $*v*$ of $*G*$ are adjacent in $*G*$ if and only if $*f*(*u*)$ and $*f*(*v*)$ are adjacent in $*H*$.
翻译中…

Input

翻译中…

The first and only line of input contains two space-separated integers $*n*$, $*m*$ ($1 ≤ *n*, *m* ≤ 50$) — the number of operations performed and the minimum cut, respectively.

翻译中…

Output

翻译中…

Output one integer — the number of non-similar worlds that can be built, modulo $10^{9} + 7$.

翻译中…

Note

翻译中…

In the first example, the following $6$ worlds are pairwise non-similar and satisfy the constraints, with $*s*(*G*)$ marked in green, $*t*(*G*)$ marked in blue, and one of their minimum cuts in light blue.

翻译中…

image

翻译中…

In the second example, the following $3$ worlds satisfy the constraints.

翻译中…

image

翻译中…

样例

Input #1
3 2
Output #1
6
InputCopy OutputCopy
Input #2
4 4
Output #2
3
InputCopy OutputCopy
Input #3
7 3
Output #3
1196
InputCopy OutputCopy
Input #4
31 8
Output #4
64921457
InputCopy OutputCopy
题目信息
题号
848D
时间限制
2 s
内存限制
256 MB
标签
组合数学
动态规划
网络流
图论

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