Determinant
Time limit5sMemory limit512 MB
Find the determinant mod 998244353 of the adjacency matrix of a connected graph where every (k+1)-vertex set has a pair separated by one edge.
- Level
Hard9 of 10
- Topics
- Graph, Dynamic programming, Matrix
- Solved
- No attempts yet
Statement
Um_nik has a simple connected undirected graph with the following property:
For any subset of vertices of the graph, there exist two vertices and some edge , such that all paths from to contain edge .
Please help him find the determinant of the adjacency matrix of his graph modulo 998 244 353.
Input
The first line contains three integers , , : the number of vertices and edges in the graph and the given parameter (, , ).
The next lines describe the edges of the graph. Each line contains two integers and , the two vertices connected by an edge (, ).
It is guaranteed that the graph is connected and that for any subset of vertices, there exist two vertices and an edge such that all paths from to contain edge . It is also guaranteed that the graph has no multiple edges.
Output
Print a single integer: the determinant of the adjacency matrix of Um_nik's graph modulo 998 244 353.
Hint
