第一篇题解有误
查看原帖
第一篇题解有误
390770
D2T1xubiaoshi楼主2022/1/1 10:36
bool dfs(int u)
{
	for(int i=1;i<=n;i++)
	{
		if(i==u||!e[u][i])continue;//这里为什么i不能等于u呢?
		if(vis[i])continue;
		vis[i]=true;
		if(!match[i]||dfs(match[i]))
		{
			match[i]=u;
			return true;
		}
	}
	return false;
}

hack:

3 3
1 1
2 2
3 3

right answer: 3

code output: 0

2022/1/1 10:36
加载中...