F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Eastest Magical Day Seep Group's Summer

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 940    Accepted Submission(s): 289


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

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
 

Author
XJZX
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-12 12:13:37, Gzip enabled