cf/mirror

Dima and Trap Graph

CF
366D2000· candidate master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
4 4
1 2 1 10
2 4 3 5
1 3 1 5
2 4 2 7
Output
6
Sample 2of 2
Input
5 6
1 2 1 10
2 5 11 20
1 4 2 5
1 3 10 11
3 4 12 10000
4 5 6 6
Output
Nice work, Dima!
366D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…