目录
_builtin_popcount()
计算32位二进制中多少个1
_builtin_popcountll()
计算64位二进制中多少个1
long long 写法看自codeforces 放回一个int值
next_permutation(p,p+n)
while(next_permutation(p,p+n)){
进行某种操作
}
全排列函数 数组p 一共有n个元素
lower_bound() ,upper_bound()
头文件: #include<algorithm>
lower_bound(first, last, val) 返回非递减序列【first, last】中第一个大于等于val的数的位置
用于LCS eg:得出的值减去起点的位置就可以得出是第几个数
upper_bound()返回非递减序列【first, last】中第一个大于val的数的位置
assert(bool a);
头文件:#include <cass