感觉题目不算太难,甚至还有一个上次笔试的原题 小红圈的数量 直接DFS记一下就OK了 #include<iostream> #include<cstring> #include<cstdio> using namespace std; const int maxn=1010; int g[maxn][maxn],n; bool visit[maxn]; void dfs(int now){ visit[now] = true; for(int i=0;i<n;++i){ if(i == now || visit[i] || g[now][i] == 0...