随笔分类 - *数据结构---线段树
摘要:Census UVA - 11297 二维线段树 lrj 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int maxn = 2010; 5 const int inf = 1<<30; 6 7 struct SegTree2
阅读全文
摘要:链接:here Can you answer these queries I SPOJ - GSS1 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define ls rt<<1 4 #define rs rt<<1|1 5 #define
阅读全文
摘要:学习了自底向上的非递归线段树,深感精妙!! 大牛的博客:http://blog.csdn.net/zearot/article/details/48299459 张坤玮 统计的力量 The Union of k-Segments CodeForces - 612D 题意:求被覆盖k次及以上的点或者线
阅读全文
摘要:题集来源:链接 发现了一个大牛的博客,线段树讲的很精彩。链接在此。 一般用线划掉的都是没有什么意义的水题。。。或者很久之前做过的,把代码粘过来了。 敌兵布阵 HDU - 1166 题意:单点更新,区间求和。 1 #include <bits/stdc++.h> 2 using namespace s
阅读全文
摘要:"Ray, Pass me the dishes!" UVALive - 3938 题意:查询区间[x,y]之间的最大连续和的区间[a,b],输出a和b。 出了点差错,,晚上回去再做 1 #include <bits/stdc++.h> 2 using namespace std; 3 #defin
阅读全文

浙公网安备 33010602011771号