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

2012年2月16日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2795View Code 1 //2795 2 #include <stdio.h> 3 const int N=200010; 4 int st[N*4]; 5 int h,w; 6 void newup(int rt) 7 { 8 st[rt]=st[rt*2]>st[rt*2+1]?st[rt*2]:st[rt*2+1]; 9 }10 void build(int l,int r,int rt)11 {12 st[rt]=w;13 if (l==r) return;14 ... 阅读全文
posted @ 2012-02-16 16:43 Qiuqiqiu 阅读(129) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1394View Code 1 //1394 2 #include <stdio.h> 3 const int N=5010; 4 int st[4*N],a[N]; 5 void newup(int rt) 6 { 7 st[rt]=st[rt*2]+st[rt*2+1]; 8 } 9 void build(int l,int r,int rt)10 {11 if (l==r)12 {13 st[rt]=0;14 return;15 }16 ... 阅读全文
posted @ 2012-02-16 15:04 Qiuqiqiu 阅读(123) 评论(0) 推荐(0) 编辑