#include <iostream>
#include <cstdio>
#include <cstring>
#include <queue>
#define mem(a,b) memset(a,b,sizeof(a))
using namespace std;
const int maxn = 500, INF = 0xfffffff;
int cx[maxn], cy[maxn], dx[maxn], dy[maxn], used[maxn], g[maxn][maxn];
int nx, ny, dis;
int bfs()
{
queue<int> Q;
dis = INF;
mem(dx,-1);
mem(dy,-1);
for(int i=1; i<=nx; i++)
{
if(cx[i] == -1)
{
Q.push(i);
dx[i] = 0;
}
}
while(!Q.empty())
{
int u = Q.front(); Q.pop();
if(dx[u] > dis) break;
for(int i=1; i<=ny; i++)
{
if(g[u][i] && dy[i] == -1)
{
dy[i] = dx[u] + 1;
if(cy[i] == -1) dis = dy[i];
else
{
dx[cy[i]] = dy[i] + 1;
Q.push(cy[i]);
}
}
}
}
return dis != INF;
}
int dfs(int u)
{
for(int i=1; i<=ny; i++)
{
if(g[u][i] && !used[i] && dy[i] == dx[u] + 1)
{
used[i] = 1;
if(cy[i] != -1 && dis == dy[i]) continue;
if(cy[i] == -1 || dfs(cy[i]))
{
cy[i]= u;
cx[u] = i;
return 1;
}
}
}
return 0;
}
int hc()
{
int res = 0;
mem(cx,-1);
mem(cy,-1);
while(bfs())
{
mem(used,0);
for(int i=1; i<=nx; i++)
{
if(cx[i] == -1 && dfs(i))
res++;
}
}
return res;
}
int main()
{
return 0;
}
自己选择的路,跪着也要走完。朋友们,虽然这个世界日益浮躁起来,只要能够为了当时纯粹的梦想和感动坚持努力下去,不管其它人怎么样,我们也能够保持自己的本色走下去。