Messager Problem(NOIOPJENGLISH20)
2022/2/8 6:14:01
本文主要是介绍Messager Problem(NOIOPJENGLISH20),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
Messager Problem
https://acs.jxnu.edu.cn/problem/NOIOPJENGLISH20
1000ms 65536K
描述:
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.
图上有n个节点,给出每个节点间的长度,找到最小为n的路径并且每个节点的路径都是不同的
输入:
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.
第一行:一个正整数表示n
接下来n行:第i行包含n个非负整数表示第i个节点到其他点的距离
输出:
One line contains N integers, indicating the indexes of nodes in the shortest path.
一行包括n个整数,表示在最短路径中节点的序号
样例输入:
4 0 2 8 4 2 0 5 7 8 5 0 1 4 7 1 0
样例输出:
3 4 1 2
这篇关于Messager Problem(NOIOPJENGLISH20)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-15鸿蒙生态设备数量超8亿台
- 2024-05-13TiDB + ES:转转业财系统亿级数据存储优化实践
- 2024-05-09“2024鸿蒙零基础快速实战-仿抖音App开发(ArkTS版)”实战课程已上线
- 2024-05-09聊聊如何通过arthas-tunnel-server来远程管理所有需要arthas监控的应用
- 2024-05-09log4j2这么配就对了
- 2024-05-09nginx修改Content-Type
- 2024-05-09Redis多数据源,看这篇就够了
- 2024-05-09Google Chrome驱动程序 124.0.6367.62(正式版本)去哪下载?
- 2024-05-09有没有大佬知道这种数据应该怎么抓取呀?
- 2024-05-09这种运行结果里的10.100000001,怎么能最快改成10.1?