An odd Graph:

Revision en1, by Matrix.code, 2015-10-25 17:25:21
You are given a undirected unweighted graph. 
Output the minimum number of edges need to be added to the graph so that , every pair of vertices has at least a even length path between them.
Imput:
A line denoting number of vertex n , and number of edges m . next m line contains the edges of the graph.
Output:
The minimum number of edges.followed by the edges

Sample input: 
3 2 
1 2
1 3
Output: 
1
2 3

Tags graphs

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Matrix.code 2015-10-25 17:25:21 450 Initial revision (published)