#include #include #include #include using namespace std; const int N=300; int head[N]; const int MAXE=5000000; const int inf=1<<30; int n,m,k; int cnt,s,t; int H[]={1,3,5,7,9}; int d[N],pre[N]; int ans=0; bool vis[N]; int q[MAXE]; struct Edge { int u,v,c,w,next; }edge[MAXE]; void addedge(int u,int v,int w,int c) { edge[cnt].u=u; edge[cnt].v=v; edge[cnt].w=w; edge[cnt].c=c; edge[cnt].next=head[u]; head[u]=cnt++; edge[cnt].v=u; edge[cnt].u=v; edge[cnt].w=-w; edge[cnt].c=0; edge[cnt].next=head[v]; head[v]=cnt++; } int SPFA() { int l,r; memset(pre,-1,sizeof(pre)); memset(vis,0,sizeof(vis)); for(int i=0;i<=t;i++) d[i]=inf; d[s]=0; l=0;r=0; q[r++]=s; vis[s]=1; while(l0&&d[u]+edge[j].w