#include "cstdio" #include "queue" using namespace std; int main(){ priority_queue<int> pqueue;//存入相反数 int n; scanf("%d",&n); for (int i = 0; i < n; ++i) { int leaf; scanf("%d",&leaf); pqueue.push(-leaf); } int res=0; while (pqueu...