强连通分量 1.缩点成一个有向无环图 2.如果有没被遍历到的点就要输出-1 3.统计每个点的入度 4.入度为0的点的数量就是答案 50分代码 #include<bits/stdc++.h> using namespace std; int n,m,num,k,cnt,ans; int in[505],x[505],a[505],head[505]; int dfn[505],low[505],vis[505],tem[505]; stack<int>s; struct Node{ int to,next; }edge[505*505]; void add(i...