![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
patpat...
一条败犬
展开
-
Contest Hunter 4301 Can you answer on these queries III
记住建树的时候赋值的节点是cnt节点,查询的时候返回的也是cnt的值 因为没有区间修改所以不用Lazy标记。。。 记录下自己犯下的低级错误,。。 #include<bits/stdc++.h> using namespace std; #define lson cnt<<1 #define rson cnt<<1|1 const int maxn = 5e...原创 2019-05-21 20:53:34 · 119 阅读 · 0 评论 -
hdu ---- Just a Hook
题目链接 错误找了三个小时 ,原因建树的时候。。。 tag没有初始化,,,当场暴毙~~~,,,啊啊啊啊啊 我才想起来是多组数据。。因为我记得结构体中的数是默认为0的 但是我忘了初始化tag。。。emm 一定要养成随手初始化的好习惯。。。呜呜呜呜。。。 #include<bits/stdc++.h> using namespace std; const int maxn = 1e5...原创 2019-05-22 11:24:58 · 86 阅读 · 0 评论