原题链接 solution:简单的优先队列模拟 #include <bits/stdc++.h> using namespace std; int main() { int t, n, res; cin >> t; while (t--) { cin >> n; priority_queue<pair<int, int>, vector<pair<int, int> >, greater<pair<int, int>> > q; for (int i = 0; i < n; ++i...