文章
14
粉丝
0
获赞
9
访问
966
priority_queue <int,vector<int>,greater<int> > pq;//定义小根堆
每次pop出的都是最小的
int temp; cin >> temp; pq.push(temp);//写入 temp = pq.top();//读出 pq.pop();//删去
登录后发布评论
暂无评论,来抢沙发