#include <cstdio>
#include <cstring>
#define maxn 61
#define maxv (maxn*maxn*2 + 1)
#define maxe (maxv*5)
#define oo 2147483647
#define min(a,b) ((a>(b)?(b):(a)))
#define maxq maxe
using namespace std;
struct edge_type
{
int x,y,flow,cost,next,op;
};
int n,m;
int a[maxn + 1][maxn + 1];
int total,totalv,source,sink;
int first[maxv + 1];
edge_type g[maxe + 1];
int dist[maxv + 1],fa[maxv + 1];
bool mark[maxv + 1];
int q[maxq + 1];
bool spfa()
{
memset(mark,0,size......
阅读全文