摘要: Problem Description 度度熊最近似乎在研究图论。给定一个有 N 个点 (vertex) 以及 M 条边 (edge) 的无向简单图 (undirected simple graph),此图中保证没有任何圈 (cycle) 存在。现在你可以对此图依序进... 阅读全文
posted @ 2018-08-12 22:55 MCQ 阅读(197) 评论(0) 推荐(0)
摘要: int pre[maxn];void init(){ for(int i=0;i<maxn;i++) { pre[i]=i; }}int Find(int x){ int p=x,tmp; while(x!=pre[x]) ... 阅读全文
posted @ 2018-08-12 21:55 MCQ 阅读(109) 评论(0) 推荐(0)