![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
玛珈山大萌新
破山中贼易,破心中贼难。不破不立,破而后立,立而为人。
展开
-
I Hate It HDU - 1754 (线段树基本操作模板题)
题目: 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M...原创 2019-07-31 23:29:00 · 146 阅读 · 0 评论 -
Count the Colors ZOJ - 1610 (基础染色问题)
Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones. Your task is counting the segments of different colors you can see at last. ...原创 2019-08-08 11:43:35 · 110 阅读 · 0 评论 -
Vases and Flowers HDU - 4614
题目: Alice有N个花瓶(标号为0~N-1)。当她收到一些花时,她会随机的选择一个瓶子A,从它开始遍历A,A+1, A+2, ..., N-1号瓶子,遇到空瓶子就放一朵花进去,直到花朵放完或没有瓶子,剩下的花将被丢弃。有时,她也会清理标号从A到B的花瓶(A <= B).花瓶里的花会被丢弃。 Input 第一行一个整数T,表示数据组数。 每组数据,第一行一个整数N(1 &...原创 2019-08-13 23:18:21 · 153 阅读 · 0 评论 -
Transformation HDU - 4578(线段树——懒惰标记的妙用)
https://www.cnblogs.com/liuwenhan/p/11342978.html原创 2019-08-12 22:21:06 · 97 阅读 · 0 评论 -
FatMouse and Cheese HDU - 1078(dfs + dp)
https://www.cnblogs.com/liuwenhan/p/11340805.html原创 2019-08-12 22:23:07 · 92 阅读 · 0 评论 -
Assign the task HDU - 3974 (dfs序 + 线段树)
https://www.cnblogs.com/liuwenhan/p/11336730.html原创 2019-08-12 22:23:57 · 84 阅读 · 0 评论 -
Tunnel Warfare HDU - 1540 (线段树不同子树的合并)
https://www.cnblogs.com/liuwenhan/p/11334603.html原创 2019-08-12 22:24:48 · 90 阅读 · 0 评论