2011年5月30日

poj 2584

摘要: #include<iostream>#include<fstream>#include<queue>using namespace std;struct e{ int data; int c,f; e *next; e *opt;};e edge[40];int n,m,total;int x[40],y[40];int mark[300];void add(int s,int t,int w){ e *p=new e; p->data=t; p->c=w; p->f=0; p->next=edge[s].next; edge[s]. 阅读全文

posted @ 2011-05-30 18:01 宇宙吾心 阅读(245) 评论(0) 推荐(0)

poj 2724

摘要: #include<iostream>#include<fstream>using namespace std;int n,m;int v[2000];int a[2][2000];int map[520][520];int link[520];int vis[520];int dfs(int s){ int i; for(i=1;i<=m;i++) if(vis[i]==0&&map[s][i]) { vis[i]=1; if(link[i]==-1||dfs(link[i])) { link[i]=s; return 1; } } return 阅读全文

posted @ 2011-05-30 11:21 宇宙吾心 阅读(189) 评论(0) 推荐(0)

poj 2949

摘要: #include<iostream>#include<fstream>using namespace std;int n;struct e{ int s,t; double w;};e edge[100001];char c[1002];int mid;int top;void add(int s,int t,int w){ edge[++top].s=s; edge[top].t=t; edge[top].w=w;}double d[27*27];int solve(){ int i,j,k; for(i=1;i<=26*26;i++) d[i]=-100000 阅读全文

posted @ 2011-05-30 11:10 宇宙吾心 阅读(394) 评论(0) 推荐(0)

poj 3160

摘要: #include<iostream>#include<fstream>using namespace std;struct e{ int data; e *next;};e edge[30001],edge1[30001];int n,m;void add(int s,int t){ e *p=new e; p->data=t; p->next=edge[s].next; edge[s].next=p;}int v[30001],dfn[30001],low[30001],top,scc[30001],sta[30001];int total;int ind 阅读全文

posted @ 2011-05-30 10:33 宇宙吾心 阅读(402) 评论(0) 推荐(0)

导航