Preparing NOJ

Messager Problem

1000ms 65536K

Description:

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.

Input:

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.

Output:

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

Sample Input:

4
0 2 8 4
2 0 5 7
8 5 0 1
4 7 1 0

Sample Output:

3 4 1 2

Info

NOIOPEN

Provider NOIOPEN

Origin 简单英文题

Code NOIOPJENGLISH20

Tags

Submitted 0

Passed 0

AC Rate 0%

Date 08/15/2021 18:56:23

Related

Nothing Yet