摘要:
vector在C++标准模板库中的部分内容,它是一个多功能的,能够操作多种数据结构和算法的模板类和函数库。 用的比较多的一些Vector的代码,牢记。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 为了可以使用vector,必须在你的头文件中包含下面的代码: #include < 阅读全文
摘要:
在广度优先遍历中,需要运用到队列,在队列中,才能更快更方便的实现将每一个的可能性遍历到。 下面是一段广搜的模板 #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 阅读全文