第21120题 单选题
Floyd算法求最短路径代码横线处应填入哪项

下列代码试图实现Floyd算法求所有点对之间的最短路径,横线处应填入( )。

void floyd(int n, int dist[][MAXN]) {
for (int k = 0; k < n; k++)
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
if (__) // 在此处填入选项
dist[i][j] = dist[i][k] + dist[k][j];
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析