characterize a crossing tree of a diagram to be a BFS tree established at vertex s if and provided that for each hub t the most limited distance among s and t in the chart is equivalent to the briefest distance among s and t in the traversing tree. Given a chart, we characterize f(x,y) to be the number of spreading over trees of that diagram that are BFS trees established at
Correct answer will be upvoted else downvoted. Computer science.
characterize a crossing tree of a diagram to be a BFS tree established at vertex s if and provided that for each hub t the most limited distance among s and t in the chart is equivalent to the briefest distance among s and t in the traversing tree.
Given a chart, we characterize f(x,y) to be the number of spreading over trees of that diagram that are BFS trees established at vertices x and y simultaneously.
You are given an undirected associated diagram with n vertices and m edges. Compute f(i,j) for all I, j by modulo 998244353.
Input
The principal line contains two integers n, m (1≤n≤400, 0≤m≤600) — the number of vertices and the number of edges in the diagram.
The I-th of the following m lines contains two integers computer based intelligence, bi (1≤
It is ensured that all edges are unmistakable and the diagram is associated.
Output
Print n lines, each comprising of n integers.
The integer imprinted in the line I and the section j ought to be f(i,j)mod998244353.
Step by step
Solved in 4 steps with 1 images