![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
L_Aster
..
展开
-
hdu4027 Can you answer these queries?(线段树)
hdu4027#include <bits/stdc++.h> using namespace std; typedef long long llt; struct Tree { int l,r; llt sum; }b[100000*4+1024]; void build(int l,int r,int i) { b[i].l=l; b[i].r=r; if(l==r){...原创 2018-04-06 00:18:36 · 195 阅读 · 0 评论 -
hdu3577 Fast Arrangement(线段树,lazy区间更新)
Fast Arrangement#include <bits/stdc++.h> using namespace std; struct Tree { int l,r,v;//v,区间l,r间的最大购票数(最大上车人数) int lazy; }b[4000000+1024]; int res[1000000]; void build(int l,int r,int i) { b[...原创 2018-04-06 09:39:51 · 253 阅读 · 0 评论