版本比较
Dijkstra算法代码
正文
增加 3 行删除 3 行
112344567822 行未改动3132333435353637383915 行未改动[P4779 【模板】单源最短路径(标准版)](https://www.luogu.com.cn/problem/P4779) [P4779 【模板】单源最短路径(标准版)](https://www.luogu.com.cn/problem/P4779)$code:$```cpp#include<bits/stdc++.h> #include<bits/stdc++.h>using namespace std;int from[100010],to[200010],net[200010],v[200010],cnt,d[100010];bool b[100010];void add(int x,int y,int w)22 行未改动 q.push({0,s}); while(!q.empty()) { int x=q.top().second; q.pop(); q.pop(); if(b[x]) continue; b[x]=1; for(int i=from[x];i;i=net[i]) {15 行未改动