![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
GAUSS_CLB
acm模板分享:https://github.com/gauss-clb/acm-algorithm-template
展开
-
dfs序+树状数组
参考这里 代码: bzoj1103 #include #include #include #define Maxn 250010 using namespace std; struct edge{ int to,next; }p[Maxn]; int n; int head[Maxn],st[Maxn],l[Maxn],r[Maxn],c[Maxn<<1]; int tot,t原创 2014-12-27 13:32:29 · 669 阅读 · 0 评论 -
hdu4031 区间更新,单点查询
Attack Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 2011 Accepted Submission(s): 588 Problem Description Today is the 10th An原创 2015-03-21 21:31:48 · 480 阅读 · 0 评论 -
poj3468 区间更新,区间查询
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 69065 Accepted: 21277 Case Time Limit: 2000MS Description You have N原创 2015-03-21 22:38:57 · 424 阅读 · 0 评论 -
poj2985 并查集+树状数组第k小
The k-th Largest Group Time Limit: 2000MS Memory Limit: 131072K Total Submissions: 7622 Accepted: 2456 Description Newman likes playing with cats. He possesses lo原创 2015-03-28 23:44:55 · 539 阅读 · 0 评论 -
bzoj3132 二维树状数组
3132: 上帝造题的七分钟 Time Limit: 20 Sec Memory Limit: 128 MB Submit: 522 Solved: 242 [Submit][Status][Discuss] Description “第一分钟,X说,要有矩阵,于是便有了一个里面写满了0的n×m矩阵。 第二分钟,L说,要能修改,于是便有了将左上角为(a,b),右下角为(c,d)原创 2015-03-22 18:32:15 · 1164 阅读 · 0 评论 -
hdu1754 单点修改,区间最值查询
I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 43497 Accepted Submission(s): 17143 Problem Description 很多学校流行一种比较的习惯。原创 2015-03-23 00:07:40 · 505 阅读 · 0 评论 -
bzoj1818
1818: [Cqoi2010]内部白点 Time Limit: 10 Sec Memory Limit: 64 MB Submit: 571 Solved: 281 [Submit][Status][Discuss] Description 无限大正方形网格里有n个黑色的顶点,所有其他顶点都是白色的(网格的顶点即坐标为整数的点,又称整点)。每秒钟,所有内部白点同时变黑,直到不存在内原创 2015-08-14 23:59:36 · 535 阅读 · 0 评论