bfs 求0—1矩陣的塊數

//1.求塊數 /*#include <stdio.h> #define maxn 100 typedef struct  { int x,y; }node; int n,m;//表示矩陣的大小; int inq[maxn][maxn]={0};//記錄位置(x,y)是否入過隊列 int X[4]={0,0,1,-1}; int Y[4]={1,-1,0,0}; int matrix[maxn][
相關文章
相關標籤/搜索