求两点之间最大边权最小的路径可以使用 dijkstra 吗?像这样:
int dijkstra(int st, int ed) {
memset(dis, 0x3f, sizeof(dis));
memset(vis, 0, sizeof(vis));
q.push({st, dis[st] = 0});
while (!q.empty()) {
int t = q.top().to; q.pop();
if (vis[t]) break; vis[t] = true;
for (auto j : p[t])
if (dis[j.to] > max(dis[t], j.w))
q.push({j.to, dis[j.to] = max(dis[t], j.w)});
}
return dis[ed];
}