摘要: #include#include#include#include#includeusing namespace std;const int inf=0x7fffffff;const int N=10000+5;int p,t,f1[N],f2[N],dis1[N],dis2[N];s... 阅读全文
posted @ 2015-09-29 23:26 xryz 阅读(118) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;typedef long long ll;const int inf=0xfffffff;const int M=1000000+5;struct Edge{ int u,v,w;} edge[M];int n,m,dis... 阅读全文
posted @ 2015-09-29 23:25 xryz 阅读(190) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;const int N= 200000+5;int a[N],ans;struct Tree{ int left,right; int sum;}tree[4*N+10];void build(int id,int ... 阅读全文
posted @ 2015-09-29 14:27 xryz 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;const int N=5000+5;int a[N];struct Tree{ int left,right,sum;}tree[4*N+10];void build(int id,int l,int r){ tr... 阅读全文
posted @ 2015-09-28 19:40 xryz 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;typedef int ll;const int N=200000+5;int a[N],ans;struct Tree{ int left,right; ll maxv;}tree[4*N+10];//建立线段树,... 阅读全文
posted @ 2015-09-28 18:53 xryz 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;struct node{ int x,y; int h;}b[510*510];int cmp(node n1,node n2){ return n1.h<n2.h;}int m... 阅读全文
posted @ 2015-09-25 13:51 xryz 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 递归#include#include#includeusing namespace std;int n,d[124][124],ans[124][124];int maxans(int i,int j){ if(ans[i][j]!=-1) return ans[... 阅读全文
posted @ 2015-09-25 11:28 xryz 阅读(131) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int cmp(int a,int b){ return a>b;}int flag,t,n,a[20],use[20];void dfs(int sum,int now){ int i; if(sum==t)... 阅读全文
posted @ 2015-09-20 15:22 xryz 阅读(145) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;typedef long long ll;int dp[1<<14];int main(){ //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout... 阅读全文
posted @ 2015-09-20 10:22 xryz 阅读(78) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include //#includeusing namespace... 阅读全文
posted @ 2015-09-18 07:03 xryz 阅读(165) 评论(0) 推荐(0) 编辑