摘要:
~~~ c++ int graph[30][30]; //无向邻接矩阵 int v_c[30]; //是否访问过 void dfs(int u){ for(int i = 0; i < 26; i++){ if(graph[u][i] && !v_c[i]){ v_c[i] = 1; DFS(i); 阅读全文
posted @ 2021-03-08 23:23
MmmelodyyY
阅读(131)
评论(0)
推荐(0)
摘要:
~~~c++ #include<bits/stdc++.h>using namespace std;int n,m;int graph[110][110];int vis[110];int ans[110],t;bool dfs(int u){ vis[u] = -1; for(int i = 1; 阅读全文
posted @ 2021-03-08 22:11
MmmelodyyY
阅读(219)
评论(0)
推荐(0)

浙公网安备 33010602011771号