Marriage Match II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5469 Accepted Submission(s): 1756 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3081 Description: Presumably, you all have k…
没啥可说的,就是一边属性一边道具建二分图,把两个属性都连到道具上,然后枚举匹配,如果无法匹配就输出,时间戳优化 #include<iostream> #include<cstdio> #include<cstring> using namespace std; const int N=1000005; int n,x,y,h[N],cnt,lk[N],v[N],ti; struct qwe { int ne,to; }e[N<<1]; int read()…