Qiuqiqiu  
不管道路多么崎岖坎坷,我永远不停下追逐梦想的脚步!

2012年4月10日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3016线段树,成段更新,区间最值View Code 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 5 #define lch (rt<<1) 6 #define rch (rt<<1|1) 7 const int N=100010; 8 struct plank 9 { 10 int h,x,y,v; 11 bool operator < (const plank & 阅读全文
posted @ 2012-04-10 20:11 Qiuqiqiu 阅读(121) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3333树状数组+离散化+离线算法读入所有区间,按右端点排序,每加入一个数时,如果已经加过,就在该数原来位置减去它,在新位置加上它View Code 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 5 typedef __int64 LL; 6 const int N=30010,Q=100010; 7 int a[N],n,vis[N]; 8 int dz[N],nd; 9 LL c[N];10 s 阅读全文
posted @ 2012-04-10 15:25 Qiuqiqiu 阅读(192) 评论(0) 推荐(0) 编辑