做了多关键字排序,然后先分配做人少的桌子,只ac 50%,不知道漏了哪些情况。 #include <iostream> #include <vector> #include <algorithm> using namespace std; bool cmp(pair<int, int> a, pair<int, int> b) { return (a.first < b.first) || (a.first == b.first && a.second > b.second); } int main...