cf/mirror

K-th Path

CF
1196F2200· master2.5s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
6 10 5
2 5 1
5 3 9
6 2 2
1 3 1
5 1 8
6 5 10
1 6 5
6 4 6
3 6 2
3 4 5
Output
3
Sample 2of 2
Input
7 15 18
2 6 3
5 7 4
6 5 4
3 6 9
6 7 7
1 6 4
7 1 6
7 2 1
4 3 2
3 2 8
5 3 6
2 5 5
3 7 9
4 1 8
2 1 1
Output
9
1196F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…