struct edge{int u,v;edge *next;}*head[N],e[N];
void add(int u,int v){
edge *p=&e[cnt++];
p->u=u;p->v=v;p->next=head[u];head[u]=p;
}
bool dfs(int u){
for(edge *p=head[u];p;p=p->next){
if(!vis[p->v]){
vis[p->v]=1;
if(!y[p->v]||dfs(y[p->v])){// 如果u->v 可以连标记 或者回溯到y[v]连的连其他的路
x[u]=p->v;y[p->v]=u;//找增广路
return true;
}
}
}return false;
}
最大匹配=最小点集
最大独立集=最小边集=|V|-最大匹配