Title
摘要: #用vector实现邻接表 #include<iostream> #include<stdio.h> #include<vector> using namespace std; int main() { vector <int > G[101]; int n,m; cin>>n>>m; for(in 阅读全文
posted @ 2021-03-13 20:43 BeautifulWater 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 用栈的方法实现深度搜索 #include<iostream> #include<stdio.h> #include<stack> #define N 100 int n; int tt; int m[N][N];//用二维数组存图 int nt[N],color[N],d[N],f[N]; stat 阅读全文
posted @ 2021-03-13 15:09 BeautifulWater 阅读(62) 评论(0) 推荐(0) 编辑