![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
Sensente
满船清梦压星河
展开
-
POJ3264 Balanced Lineup(线段树)
POJ3264http://poj.org/problem?id=3264 线段树模版。 题目大意: Q次区间查询。 AC代码: #include <iostream> #include <cstdio> #include <cmath> using namespace std; const int maxn = 50000 + 5; int a[...原创 2019-09-13 11:22:38 · 167 阅读 · 0 评论 -
杭电1754 I Hate It(线段树)
HDU1754http://acm.hdu.edu.cn/showproblem.php?pid=1754 I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 127543 Accepted Submissio...原创 2019-09-14 09:58:22 · 153 阅读 · 0 评论 -
杭电1166 敌兵布阵(线段树)
HDU1166http://acm.hdu.edu.cn/showproblem.php?pid=1166 敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 153319 Accepted Submission(s):...原创 2019-09-14 16:20:26 · 170 阅读 · 0 评论 -
数据结构 线段树与树状数组
一、线段树 Reference:https://www.cnblogs.com/AC-King/p/7789013.html 要解决的问题: 1.查询区间[L,R]之间的最值 2.修改a[i]为x; 明确可以解决的问题: 必须是满足区间可加性的问题,例如: 符合区间加法的例子: 数字之和——总数字之和 = 左区间数字之和 + 右区间数字之和 最大公因数(GCD)——总GCD ...原创 2019-09-14 23:52:58 · 586 阅读 · 0 评论 -
杭电2795 Billboard(线段树)
HDU2795http://acm.hdu.edu.cn/showproblem.php?pid=2795 Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 32859 Accepted Submissi...原创 2019-09-15 00:02:15 · 168 阅读 · 0 评论 -
杭电1698 Just a Hook(延时标记线段树)
Problem Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same...原创 2019-09-16 16:08:56 · 167 阅读 · 0 评论