hdu3926Hand in Hand
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=3926View Code hdu3926Hand in Hand/*题意:判断两幅图是否同构 图中即判断图中环和链的个数是否相同 环和链是否一一相对应利用并查集 一个集合中若人数num[]和拉手对手p[]相等 则为环,num[]==p[]+1则为链*/#include<iostream>#include<set>#include<algorithm>using namespace std;const int maxn=10001;int pre[maxn],p[maxn], 阅读全文