06 2013 档案

摘要:分析看这个大神的,我的还是参考他说的算法实现的:http://www.dxmtb.com/blog/diff/ 1 #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 #include<algorithm> 5 using namespace std; 6 const int maxm = 1000005; 7 const int maxn = 50005; 8 9 10 int C[maxn],next[maxn],B[maxn];11 int flag[maxm];12 st 阅读全文
posted @ 2013-06-03 18:31 等待最好的两个人 阅读(422) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1166;树状数组: 1 #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 #include<algorithm> 5 using namespace std; 6 7 const int maxn = 50050; 8 int n,T; 9 int a[maxn];10 int C[maxn];11 int lowbit(int x){12 return x&(-x);13 阅读全文
posted @ 2013-06-02 22:59 等待最好的两个人 阅读(148) 评论(0) 推荐(0)
摘要:#include<iostream>#include<cstdio>#include<cstring>#include<queue>#include<algorithm>using namespace std;const int maxn = 1005;const int maxm = 100005;const int INF = 0x3f3f3f3f;int N,M,X;int first[maxn];int en;int d[maxn],d1[maxn];struct Edge{ int u,v,w; int next; void 阅读全文
posted @ 2013-06-01 19:37 等待最好的两个人 阅读(143) 评论(0) 推荐(0)