STL小结

(updating)。。。。。

二进制

__builtin_popcount(x)

返回值 (x)在二进制下的(1)的个数

priority_queue<int,vector,greater > q;

队列

priority_queue

priority_queue<int,vector<int>,less<int> > 

从小到大

若要从大到小


priority_queue<int,vector<int>,greater<int> > 
  

若是结构体

写重载

(string)

在前面 后面插入字符串

  
 string a;
 a += 'a';
 a = 'a' + a;

删除

  erase()

(set)

lower_bound()--返回指向大于(或等于)某值的第一个元素的迭代器
upper_bound()--返回大于某个值元素的迭代器
find()--返回一个指向被查找到元素的迭代器
原文地址:https://www.cnblogs.com/resftlmuttmotw/p/11670931.html