版本比较
题解:P10947 Sightseeing
正文
增加 4 行删除 4 行
58 行未改动5960616263646566676 行未改动7475767778798081828384858687888990919211 行未改动58 行未改动}c[s][0]=1;priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>>q;q.push({0,s});while(!q.empty()){auto [dis,u]=q.top();q.pop();if(v[u].count(dis))continue;6 行未改动q.push({nd,v});}}}return c[f][d[f]]+c[f][d[f]+1];}signed main(){ios::sync_with_stdio(0);cin.tie(0),cout.tie(0);int t;cin>>t;while(t--){cin>>n>>m;for(int i=1;i<=n;i++)g[i].clear();for(int i=0;i<m;i++){11 行未改动58 行未改动5960616263646566676 行未改动7475767778798081828384858687888990919211 行未改动58 行未改动}c[s][0]=1;priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>>q;q.push({0,s});while(!q.empty()){auto [dis,u]=q.top();q.pop();if(v[u].count(dis))continue;6 行未改动q.push({nd,v});}}}return c[f][d[f]]+c[f][d[f]+1];}signed main(){ios::sync_with_stdio(0);cin.tie(0),cout.tie(0);int t;cin>>t;while(t--){cin>>n>>m;for(int i=1;i<=n;i++)g[i].clear();for(int i=0;i<m;i++){11 行未改动