Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (1)
Depth-First-Search
no vote
An undirected weighted graph of selected vertices is given. The number of vertices found where the connection component (including the selected one) belongs to the selected vertex. The first input line contains two integers n and S (1 ≤ n ≤ 100), where n-graph and s-select the number of vertices. The following n rows contain n numbers - the adjacency matrix graph & quot; 0 & quot; of the MDM graph indicates that there is no edge between the vertex and the number & quot; 1 & quot; - its availability. This ensures that the main diagonal of the matrix will always be zero. Output the number of vertices needed to print
Hasham
2016-08-23
1
1
No more~