摘要:
关键在于模型的抽象与理解。CODE:#include<iostream>#include<cstdlib>#include<cstring>#include<cstdio>#include<map>#include<cmath>usingnamespacestd;constintMAXN=510;structnode{intcostM;inttot;intx1,y1,x2,y2;}a[MAXN];intG[MAXN][MAXN];intxlink[MAXN],ylink[MAXN];boolvis[MAXN];intnx, 阅读全文
摘要:
匹配必须大于或者等于P,学生人数必须大于P。CODE:#include<iostream>#include<cstdlib>#include<cstring>#include<cstdio>usingnamespacestd;constintMAXN=310;constintMAXM=310*310;intfirst[MAXN],xlink[MAXN],ylink[MAXN];boolvis[MAXN];intG[MAXN][MAXN];intnx,ny;voidinit(){memset(G,0,sizeof(G));memset(xlink, 阅读全文