版本比较
君の最短路
正文
增加 1 行删除 1 行
143 行未改动全部展开144145146147148148149150151152118 行未改动全部展开143 行未改动全部展开 node x=q.top(); q.pop(); int u=x.now; //记录堆顶(堆内最小的边)并将其弹出 if(vis[u]) continue; if(vis[u]) continue; //没有遍历过才需要遍历 vis[u]=1; for(int i=head[u];i;i=e[i].next) //搜索堆顶所有连边118 行未改动全部展开