STL遗忘的知识点
📅 2026/8/2 7:39:42
👁️ 阅读次数
📝 编程学习
这里就只总结遗忘的知识点了hh
#include<queue>
int main()
{
priority_queue<int, vector<int>, greater<int>> q; //从大根堆变成小根堆
vector<int>num;
auto it1 = upper_bound(num.begin(), num.end(), 1); //大于1的最小数,返回迭代器
auto it2 = lower_bound(num.begin(), num.end(), 1); //大于等于1的最小数,返回迭代器
return 0;
}
priority_queue默认是大根堆
编程学习
技术分享
实战经验