pop并不能真正地释放空间,可以使用一个非常高妙的swap方法:
void clear(){ priority_queue<int>el;swap(l,el); priority_queue<int,vector<int>,greater<int> >er;swap(r,er); }