【USTCPC2025】M. 生成树!
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目背景
克露丝卡尔酱喜欢生成树!
克露丝卡尔酱认为对称结构十分完美!
克露丝卡尔酱可爱!
题目描述
克露丝卡尔酱想要计数 个点的 阶轮的生成树个数。
个点的 阶轮的定义为:
- 为中心, 构成一个环(对于 , 和 之间有连边, 和 之间有连边)。
- 对于 , 和 之间有额外连边。
保证 ,答案对 取模。
输入格式
一行两个正整数 。,,保证 。
输出格式
一行一个正整数,表示答案。
样例
input:
4 1
output:
45
input:
6 2
output:
50
提示
两个样例中的轮分别为:
USTCPC2025 线下赛
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 15
- Start at
- 2025-3-23 12:00
- End at
- 2025-3-23 17:00
- Duration
- 5 hour(s)
- Host
- Partic.
- 64