过山车
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 7856 Accepted Submission(s): 3434
1<=N 和M<=500.接下来的K行,每行有两个数,分别表示女生Ai愿意和男生Bj做partner。最后一个0结束输入。
1 1
1 2
1 3
2 1
2 3
3 1
0
#include <iostream>
#include <cstdio> #include <cstring> #include <vector> using namespace std; vector<int> g[555]; bool match(int x) int hungary() int main() |
* This source code was highlighted by YcdoiT. ( style: Codeblocks )