摘要:
1 #include<stdio.h> 2 const int N = 1010; 3 int pref[N][N], order[N][N], next[N]; 4 int fh[N], fw[N]; 5 int q[N * 100], rear, front; 6 void engage(int man, int woman) { 7 int m = fh[woman]; 8 if(m) { 9 fw[m] = 0;10 q[++rear] = m;11 }12 fw[man] = woman;13 fh[woman... 阅读全文