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

建议使用的浏览器:

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

5304:Eastest Magical Day Seep Group's Summer

题目描述
As we know, Tsuyuri Kumin likes sleeping in Eastest magical day sleep group's summer. But Rikka wants Kumin to play games with her. So she comes up with one problem:

Here is an undirected graph $G$ with $n$ vertices and $m$ edges. Now you need to delete $m-n$ edges and to make sure that the remain graph is connected. Rikka wants you to tell her the number of ways to choose the edges.

Kumin wants to go to sleep, so she asks you to answer this question. Can you help her?
输入解释
There are at most 100 testcases,and there are no more 5 testcases with $n \geq 10$.

For each test case, the first line contains two integers $n, m\ (1 \leq n \leq 16, n \leq m \leq \frac{n(n-1)}{2})$.

Then $m$ lines follows. Each of them contains two integers $u_i,v_i$, meaning that there is an edge between $u_i$ and $v_i$. It is guaranteed that the graph doesn't contain self loops or multiple edges.
输出解释
For each testcase print a single integer - the number of ways to choose the edges. The answer may be very large, so you only need to print the answer modulo 998244353.
输入样例
4 5
1 2
2 3
3 4
4 1
1 3
输出样例
5
来自杭电HDUOJ的附加信息
Author XJZX
Recommend wange2014

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

源链接: HDU-5304

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

共提交 0

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