선인장 그래프의 인접 행렬 행렬식을 소수 993244853으로 나눈 나머지를 구한다.
어려움8수학그래프조합론동적 계획법아직 제출이 없습니다시간 제한0.4초메모리 제한1024 MBA Cactus graph is a simple connected undirected graph where each edge lies in at most one simple cycle.
An adjacency matrix of a N-vertex graph is a N×N integer matrix, where A_i,j is 1 if there exists an edge connecting vertex i and j, and 0 otherwise.
The Determinant of a N×N matrix is defined as ∑_p∈P(N)(−1)inv(p)(∏_i=1nA_i,p_i) , where P(N) is the set of all permutations of size-N, and inv(p) is the number of pairs 1≤i<j≤N such that p_i>p_j.
993244853 is a prime number that looks like 998244353=119×223+1, but is actually not.
This problem asks you to calculate the determinant of an adjacency matrix of given cactus graph mod 993244853.
The first line contains N,M, denoting the number of vertices and edges of the cactus graph. (1≤N≤50000,0≤M≤250000)
In the next M lines, two distinct integers s,e denoting each endpoint of the edges are given. (1≤s,e≤N,s=e).
It is guaranteed that the graph is connected, it does not contain loops or multiple edges, and every edge belongs to at most one simple cycle.
Print the determinant of an adjacency matrix of given cactus graph mod 993244853.