随笔分类 -  线段树

摘要:[link](https://www.luogu.com.cn/problem/P1253) 非常直白的线段树题目 要注意负数的问题以及吮吸 ```cpp #include #include #include #define int long long using namespace std; in 阅读全文
posted @ 2023-07-20 11:05 Simex 阅读(38) 评论(0) 推荐(0) 编辑
摘要:Archie 树链刨分之后很显然就成了一条一条的链 那么用线段树维护一下就行了 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n,m,r,pp; s 阅读全文
posted @ 2021-07-21 20:32 Simex 阅读(39) 评论(0) 推荐(0) 编辑
摘要:Archie 线段树精简版 没有lazy,没有pushdown #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #define int long long using namespace std; c 阅读全文
posted @ 2021-07-19 20:57 Simex 阅读(59) 评论(0) 推荐(0) 编辑
摘要:Archie 这叫啥啊,区间异或+区间求和 我用动态开点写的 #include<iostream> #include<cstdio> #include<algorithm> #define ll long long using namespace std; int n,m; int x,y,z; i 阅读全文
posted @ 2021-07-18 16:31 Simex 阅读(35) 评论(0) 推荐(0) 编辑
摘要:链接:Miku 和[线段树2](https://www.luogu.com.cn/problem/P3373) 一样的题 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #define int lon 阅读全文
posted @ 2020-09-12 20:06 Simex 阅读(118) 评论(0) 推荐(0) 编辑
摘要:Miku 仍然还是线段树的水题 惨痛教训:不要无脑复制板子 #include<iostream> #include<cstring> #include<algorithm> #include<cstdio> #define int long long using namespace std; lon 阅读全文
posted @ 2020-09-06 21:34 Simex 阅读(120) 评论(0) 推荐(0) 编辑
摘要:Miku 对于线段树来讲,lazy的更新是一个要仔细考虑的问题 #include<iostream> #include<cstdio> #include<cstring> #include<cstring> using namespace std; int n,m; int sum[1200005] 阅读全文
posted @ 2020-09-06 20:52 Simex 阅读(84) 评论(0) 推荐(0) 编辑

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