![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构——线段树
QYitong
这个作者很懒,什么都没留下…
展开
-
CDOJ 1325 卿学姐与基本法(离散化+线段树)
题解:看题目想到线段树,但是因为数据范围太大,显然不能直接使用线段树,所以这里应该加上离散化操作代码如下:#include #include using namespace std;const int maxn=100005;int c[2*maxn],kind[maxn],tree[8*maxn],lazy[8*maxn];int cl[maxn],cr[maxn];map原创 2017-03-12 23:50:59 · 652 阅读 · 0 评论 -
Gym100507C--Zhenya moves from parents(线段树+懒标记)
Problem C. Zhenya moves from parentsTime limit: 1 secondMemory limit: 64 megabytesZhenya moved from his parents’ home to study in other city. He didn’t take any cash with him, he onlytook his原创 2017-01-31 16:39:06 · 384 阅读 · 0 评论 -
HUD1556 (树状数组解法+线段树解法)
Color the ballTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 18680 Accepted Submission(s): 9319Problem DescriptionN个气球排成一排,从原创 2017-03-04 18:07:25 · 386 阅读 · 0 评论