AtCoder Grand Contest 067
翻译中…
Problem Statement
翻译中…
You are given an integer $N$ and a prime $P$.
翻译中…
Count the number, modulo $P$, of undirected connected graphs $G$ of $N$ vertices numbered $1$ to $N$ that satisfy the following condition:
翻译中…
- There are no self-loops in
$G$. Note that multiple edges are allowed. - For all edges
$(u,v)$in$G$, if we delete$(u,v)$from$G$,$G$remains connected. In other words,$G$is edge-biconnected. - For all edges
$(u,v)$in$G$, if we delete$(u,v)$from$G$,$G$is no longer edge-biconnected.
翻译中…
Two graphs are considered different if and only if there exists a pair of distinct vertices $(u,v)$ such that the numbers of edges connecting $u$ and $v$ in the two graphs are different.
翻译中…
Constraints
翻译中…
$2 \le N \le 50$$10^9<P<1.01\times 10^9$$P$is prime.- All input values are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N P
翻译中…
Output
翻译中…
Print the answer.
翻译中…
样例
Input #1
2 1005976817
Output #1
1
Input #2
5 1000837403
Output #2
372
Input #3
10 1001160547
Output #3
789846604
Input #4
20 1006779551
Output #4
888612770
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。