#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int M=510;
int m,n;
int map[M][M], match[M], chk[M];
int dfs(int p)
{
int i;
for(i=1;i<=m;i++)
if( map[p][i] && chk[i]==0 )
{
chk[i]=1;
if( match[i]==0 || dfs( match[i] ) )
{
match[i]=p;
return 1;
}
}
return 0;
}
int solve()
{
int i,res;
memset(match,0,s......
阅读全文