cf/mirror

The Fair Nut and the Best Path

CF
1083A1800· expert3s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3
1 3 3
1 2 2
1 3 2
Output
3
Sample 2of 2
Input
5
6 3 2 5 0
1 2 10
2 3 3
2 4 1
1 5 1
Output
7
1083A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…