从床去匹配人 need为待匹配的人的数量 hg.cnt为匹配出的最大的人的数量 #include<bits/stdc++.h> using namespace std; using ll =long long; vector<int>is_bed; vector<int>is_wait; class Hungarian{ public: vector<vector<int>>edge; vector<int>match; vector<bool>st; int n,m,cnt=0; explicit Hunga...