10 2021 档案

摘要:cite 阅读全文
posted @ 2021-10-26 09:21 Xuuxxi 阅读(16) 评论(0) 推荐(0) 编辑
摘要:一些笔记 cite greater() 头文件 #include upper/lower_bound() 查找小于/小等于 相应的队列也要逆序存 对于想要查找小于/小等于 一定要先逆序数组/容器再查找,没查到也是返回end #include<iostream> #include<algorithm> 阅读全文
posted @ 2021-10-23 22:29 Xuuxxi 阅读(220) 评论(0) 推荐(0) 编辑
摘要:区间选点 区间问题一般对右端点进行排序并用右端点映射左端点 可以高效判断 wa 区间覆盖了,左端点不是最大值 #include<iostream> #include<algorithm> #include<map> using namespace std; int n; map<int,int> a 阅读全文
posted @ 2021-10-23 21:30 Xuuxxi 阅读(48) 评论(0) 推荐(0) 编辑
摘要:cite 阅读全文
posted @ 2021-10-23 20:42 Xuuxxi 阅读(31) 评论(0) 推荐(0) 编辑
摘要:线段树 线段树的建树,更新点、区间,查找点、区间 //左子树 u << 1, 右子树 u << 1 | 1 //建树或遍历核心是判断 mid 和 l,r 的关系 //是大区间包容小区间,优先遍历大区间 // lazy_tag 用作处理记录器,用到就处理,没用到只处理总节点,节省时间 //考虑最坏情况 阅读全文
posted @ 2021-10-15 21:33 Xuuxxi 阅读(39) 评论(0) 推荐(0) 编辑
摘要:关于树状数组 cite 以 O(logn) 的时间复杂度查找、改变前缀和数组 要注意: 树状数组 c 里面存的不是对应点的值、也不是前缀和的值,是树状数组的值 但是可以利用树状数组对一个区间进行 log n 的时间复杂度的改变或求某点前缀和 //O(nlogn) 初始化 for(int i = 1; 阅读全文
posted @ 2021-10-11 20:10 Xuuxxi 阅读(29) 评论(0) 推荐(0) 编辑
摘要:蒙德里安的梦想 #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; typedef long long ll; const int N = 12; const i 阅读全文
posted @ 2021-10-05 19:07 Xuuxxi 阅读(39) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示