随笔分类 -  线段树(初级)

摘要:之前做过 区间更新的 所以这个做起来要容易些 算是线段树的水题吧都是基本操作 直接贴代码#include#include#define Size 200000using namespace std;struct node{ int L, R, Score; int Max... 阅读全文
posted @ 2015-07-26 15:52 _SunDaSheng 阅读(127) 评论(0) 推荐(0)
摘要:#include#includeusing namespace std;#define Size 100000struct Node{ int L, R; long long Sum, Inc; int Mid() { ... 阅读全文
posted @ 2015-07-26 08:37 _SunDaSheng 阅读(120) 评论(0) 推荐(0)
摘要:#include#include#includeusing namespace std;#define Size 50000struct node{ int L, R, V; node* lchild; node* rchild;}Tree[2*Size];... 阅读全文
posted @ 2015-07-23 21:56 _SunDaSheng 阅读(136) 评论(0) 推荐(0)
摘要:#include#includeusing namespace std;const int INF = 0xffffff0;int MIN = INF;int MAX = -INF;struct Node{ int L, R; int Max, Min; i... 阅读全文
posted @ 2015-07-22 22:11 _SunDaSheng 阅读(128) 评论(0) 推荐(0)