-->
当前位置:首页 > 题库

PROGRAMMING:Matrix to adjacency table and depth first traversal

Luz5年前 (2021-05-10)题库402
Transform adjacency matrix storage into adjacency table storage graph and traverse depth first [test case: level 16 of IOT project, Zhang Xuliang]
###Input format:
Input an n to represent the number of nodes, input the adjacency matrix in turn, and then input an N2 to represent the traversal starting from N2.
###Output format:
Output the adjacency table that has been traversed first
###Input example:
Here is a set of inputs. For example:
```in
three
0 1 0
0 0 1
1 0 0
0
```
###Output example:
The corresponding output is given here. For example:
```out
0 1 2
```







answer:If there is no answer, please comment