图结构练习——BFS——从起始点到目标点的最短步数

#include <stdio.h> #include <string.h> #include <queue> using namespace std; struct node      //用结构体来存储当前查找的点和到达这一点经过的步数 {     int data;     int step; }; int a[1005][1005], book[1005]; int n, m; st
相关文章
相关标签/搜索