萌新刚学OI,求助最大流
查看原帖
萌新刚学OI,求助最大流
360511
UperFicial楼主2021/4/7 12:30

我建图用的链式前向星,是这么写的:

inline void add_edge(int u,int v,ll w)
{
	edge[++tot].nxt=head[u];
	head[u]=tot;
	edge[tot].to=v;
	edge[tot].cost=w;
	return;
}

当我初始 tot=0\text{tot=0} 时会 WA\texttt{\color{red}WA} 掉,但当初始为 11 的时候就 AC\texttt{\color{green}AC} 了,求问这是为什么啊,以前写图论的题也都是初始为 00 啊?/kel

2021/4/7 12:30
加载中...