0
点赞
收藏
分享

微信扫一扫

Messager Problem(翻译)

外贸达人小峻先森 2022-02-11 阅读 76
c++

http://noi.openjudge.cn/english/20/

描述

There are N nodes in the graph. Given the length of edges between the nodes, find the shortest path of size N and the nodes in the path are all different.

输入

First line: one positive integer N (N <= 15).
Next N lines: the i-th line contains N non-negative integers (<= 1000) indicating the length of edges between the i-th node and other nodes.

输出

One line contains N integers, indicating the indexes of nodes in the shortest path.

                                    信使

描述:

图中有N个节点。给定节点之间的边缘长度,找到大小为N的最短路径,路径中的节点都不同。

输入:

第一行:一个正整数NN <= 15

接下来N行:第i行包括N个非负数表示.第i个节点与其他节点之间的边的长度

输出:

一行包括N个整数,表示最短路径中结点的索引

举报

相关推荐

0 条评论