PAT 1107 Social Clusters (30 分)

解析 #include<cstdio> #include<vector> #include<algorithm> using namespace std; const int maxn = 1010; int hobby[maxn]{0}; bool isroot[maxn]{ false }; int findFather(int x) { if (x == hobby[x]) //fa
相關文章
相關標籤/搜索