当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5552:Bus Routes

题目描述
In order to develop local tourism, Major Fu plans to introduce several bus routes between attractions in his city. There are $M$ types of buses, namely the Green Bus, the Red Bus, the Blue Bus, etc., and $N$ attractions in his city. He wants the arrangement to satisfy the following requirements:

  $\cdot$There is at most one type of buses between any two attractions.
  $\cdot$Visitors can travel between any two attractions by bus.
  $\cdot$Many visitors likes circle trip, in which the visitors start from an attraction and get back to the attraction via a sequence of other attractions. At least one circle trip should be made available via buses. The circle trips do not have to contain all attractions.

Can you help him to calculate the number of ways he can arrange the bus routes? Please note that you do not need to use all types of buses in each arrangement and bus routes are two-way.
输入解释
The first line of input contains a number $T$ indicating the number of test cases ($T≤200$).

For each case, there is only one single line containing two non-negative integer $N$ and $M$ ($1<N≤10000,0<M<2^{31}$).
输出解释
For each test case, output a single line consisting of “Case #X: Y”. $X$ is the test case number starting from 1. $Y$ is the answer modulo 152076289.
输入样例
3
3 1
3 2
4 2
输出样例
Case #1: 1
Case #2: 8
Case #3: 496
来自杭电HDUOJ的附加信息
Recommend wange2014

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5552

最后修改于 2020-10-25T23:23:42+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
8000/4000MS(Java/Others) 65536/65536K(Java/Others)