线段树
ChengYuQi621
北京邮电大学人工智能学院
展开
-
P1531 I Hate It
https://www.luogu.org/problemnew/show/P1531 #include <iostream> #include <cstdio> #include <cmath> #define ll long long using namespace std; const int MAXN=800005; int n,m,u,v; char...原创 2019-07-18 13:18:35 · 71 阅读 · 0 评论 -
P3372 【模板】线段树 1
https://www.luogu.org/problemnew/show/P3372 #include <iostream> #include <cstdio> #include <cmath> #define ll long long using namespace std; const int MAXN=400005; int n,m,x,u,v; ll...原创 2019-07-18 13:19:57 · 116 阅读 · 0 评论 -
P3373 【模板】线段树 2
https://www.luogu.org/problemnew/show/P3373 #include <iostream> #include <cstdio> using namespace std; //题目中给的p int p; //暂存数列的数组 long long a[100007]; //线段树结构体,v表示此时的答案,mul表示乘法意义上的lazytag,a...原创 2019-07-18 13:21:57 · 87 阅读 · 0 评论 -
P1816 忠诚
https://www.luogu.org/problem/P1816 #include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <queue> #include <stack> #include <cma...原创 2019-08-20 14:23:06 · 172 阅读 · 0 评论 -
P2880 [USACO07JAN]平衡的阵容Balanced Lineup
https://www.luogu.org/problem/P2880 #include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <queue> #include <stack> #include <cm...原创 2019-08-20 17:23:11 · 95 阅读 · 0 评论