摘要:
在广度优先遍历中,需要运用到队列,在队列中,才能更快更方便的实现将每一个的可能性遍历到。 下面是一段广搜的模板 #include<stdio.h>#include<string.h>#include<iostream>#include<algorithm>#include<queue>using n 阅读全文
摘要:
#include<stdio.h>#include<string.h> char map[25][25];int n,m;int mark[25][25]; void dfs(int x,int y){ if(x>=0&&y>=0&&x<n&&y<m) { if(map[x][y]=='.'&&ma 阅读全文