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

2012年5月4日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3518后缀数组View Code 1 //3518 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 6 int Max(int x,int y) {return x>y?x:y;} 7 int Min(int x,int y) {return x<y?x:y;} 8 const int L=1010; 9 char str[L];10 int r[L],wa[L],wb[L],ws[L];1 阅读全文
posted @ 2012-05-04 09:30 Qiuqiqiu 阅读(285) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1892二维树状数组View Code 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 const int N=1010,maxn=1001; 6 int a[N][N],c[N][N]; 7 int lowbit(int x) 8 { 9 return x&(-x);10 }11 void add(int x,int px,int py,int maxn)12 {13 for(int i=p 阅读全文
posted @ 2012-05-04 09:28 Qiuqiqiu 阅读(161) 评论(0) 推荐(0) 编辑