编程介的小学生 2017-10-29 03:07 采纳率: 20.5%
浏览 794
已采纳

Eastest Magical Day Seep Group's Summer

Problem Description
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?

Input
There are at most 100 testcases,and there are no more 5 testcases with n≥10.

For each test case, the first line contains two integers n,m (1≤n≤16,n≤m≤n(n−1)2).

Then m lines follows. Each of them contains two integers ui,vi, meaning that there is an edge between ui and vi. It is guaranteed that the graph doesn't contain self loops or multiple edges.

Output
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.

Sample Input
4 5
1 2
2 3
3 4
4 1
1 3

Sample Output
5

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-11-17 15:45
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?