Problem analysis:
For this problem,first give you some people's name and then give you the relations of them.
Now,you task is calculate the maximum steps between the every two guys.
To solve the problem,you just need to calculate all the steps between the every two guys.
And of course,the BFS is good to use.
Here is the detailed code:
#include #include #include #include #include