版本比较
2026-4-26 题目总结
正文
增加 3 行删除 3 行
54 行未改动5556575859596061626314 行未改动787980818282838485868 行未改动959697989999100101102103132 行未改动全部展开54 行未改动
while(!q.empty()){ int now = q.front(); q.pop();
for(auto v : g[now]){ if(dis[v][x] == -1){ dis[v][x] = dis[now][x] + 1; q.push(v);14 行未改动
for(int i = 1;i <= m;i++){ int u,v; cin >> u >> v;
g[u].push_back(v); g[v].push_back(u); }
8 行未改动 ans += dis[i][j]; } cout << ans << " "; }
return 0;}```
132 行未改动全部展开