command
Version:
v0.0.0-...-0b623e9
Opens a new window with list of versions in this module.
Published: Jun 14, 2022
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
题目
给定一张由 $T$ 条边构成的无向图,点的编号为 $1 \sim 1000$ 之间的整数。
求从起点 $S$ 到终点 $E$ 恰好经过 $N$ 条边(可以重复经过)的最短路。
注意: 数据保证一定有解。
输入格式
第 $1$ 行:包含四个整数 $N,T,S,E$。
第 $2..T+1$ 行:每行包含三个整数,描述一条边的边长以及构成边的两个点的编号。
输出格式
输出一个整数,表示最短路的长度。
数据范围
$2 \le T \le 100$,
$2 \le N \le 10^6$
输入样例:
2 6 6 4
11 4 6
4 4 8
8 4 9
6 6 8
2 6 9
3 8 9
输出样例:
10
题解
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.