随笔分类 - Atcoder
摘要:bitset总结+测试 bitset总是在给定的位数中进行操作的,pos顺序指的是从右到左。 若有1的值在范围内操作后便看不到了。 //创建 bitset<7>b1; bitset<7>b2; //几个运算 b1|=b2; b1^=b2; b1&=b2; b1=~b1; b1<<=4; //几个设置
阅读全文
摘要:Sequence Query 题意: 插入元素,查找不小于x的第k个元素和查找不大于x的第k个元素 思路: 使用multiset来写,排序复杂度为nlogn 注意这里的upper和lower,也可以直接用se.lower_bound()来表示或者upper_bound()来表示,迭代器用auto u
阅读全文