关键路径 求vl

fill(vl,vl+n,ve[n-1]);

while(!toporder.empty()) {
	int u=toporder.top();
	toporder.pop();
	for(int i=0; i<G[u].size(); i++) {
		if(vl[G[u][i].v]-G[u][i].w<vl[u]) {
			vl[u]=vl[G[u][i].v]-G[u][i].w;
		}
	}
}

全部评论
有没有大佬呀,求解
点赞 回复 分享
发布于 2022-11-03 12:08 广西

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务