![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
文章平均质量分 81
Twilightuse
这个作者很懒,什么都没留下…
展开
-
线段树单点更新+区间更新+离散化
线段树单点更新 http://poj.org/problem?id=3264原创 2014-08-20 16:53:30 · 401 阅读 · 0 评论 -
POJ 2528 Mayor's posters 题解
http://poj.org/problem?id=2528原创 2014-08-23 15:37:07 · 446 阅读 · 0 评论 -
HDU 5023 A Corrupt Mayor's Performance Art(线段树区间更新)
http://acm.hdu.edu.cn/showproblem.php?pid=5023 题意:p a b c 就是将原创 2014-09-23 09:35:03 · 332 阅读 · 0 评论 -
Uva 11992 - Fast Matrix Operations题解(线段树区间更新+区间Set+Add,查询最大值,最小值,总和)
Problem F Fast Matrix Operations There is a matrix containing at most 106 elements divided into r rows and c columns. Each element has a location (x,y) where 1 1 x1 y1 x2 y2 v Increment each ele原创 2014-09-24 23:36:27 · 667 阅读 · 0 评论 -
UVA 12663 (线段树区间更新+二分查找,Q次区间更新后,求满足结果大于K的个数)
看见这种区间更新的题目,首先想到的就是,原创 2014-09-05 18:42:45 · 862 阅读 · 0 评论 -
Uva 11235 (RMQ)
两个代码都是WA RMQ: #include #include #include using namespace std; #define MAX 100009 #define INF -0x7f7f7f int a[MAX],num[MAX],value[MAX],Count[MAX],left[MAX],right[MAX]; int dp[100009][100]; vo原创 2014-09-25 15:57:24 · 350 阅读 · 0 评论 -
hdu 4122 Alice's mooncake shop题解
题目大意:一个月饼店开m个小时(24小时营业),只在整点做月饼,做月饼的能力非常强。现在只需要考虑成本的问题。给m个cost值,cost[i]表示第i个小时做1个月饼的代价。 再给n个时间,从2000年1月1日0时开始计算。表示订单的截止时间。当然为了节约成本,可以提前趁成本不高的时候做月饼。但是月饼有保质期,t天,月饼放冰箱保存也需要代价,一天花费s。现在求完成n个订单最小代价。原创 2014-11-09 15:17:16 · 417 阅读 · 0 评论 -
HDU 2795 Billboard
题意: 海报按顺序贴在,可以贴的最左上方。 题解: 最多有min(h,n)行可以贴,那么,每行看成一个节点,用线段树去维护。 //HDU 2795 Billboard #include #include #include using namespace std; #define MAX 200009*3 struct Node { int Max; int L,R;原创 2014-11-29 10:11:41 · 351 阅读 · 0 评论