原文:
描述
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 的最短路径,路径中的节点都是不同的。
输入:
第一行: 一个正整数 n (n < = 15)
接下来的n 行: i-th 行包含 n 个非负整数(< = 1000) ,表示 i-th 节点和其他节点之间的边的长度
输出:
一行包含 n 个整数,表示最短路径中节点的索引。