摘要: 【算法】线段树 【注意】修改或查询区间时,若区间能包含某棵子树就立即返回,否则线段树就失去了意义。 #include<cstdio> #include<algorithm> using namespace std; const int inf=0x3f3f3f3f; struct treess{in 阅读全文
posted @ 2016-08-17 10:19 ONION_CYC 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 【算法】线段树 #include<cstdio> #include<algorithm> using namespace std; struct treess{int l,r,ms;}t[400010]; const int maxn=200010,inf=0x3f3f3f3f; int a[max 阅读全文
posted @ 2016-08-17 08:31 ONION_CYC 阅读(194) 评论(0) 推荐(0) 编辑