cf/mirror

Paths and Trees

CF
545E2000· candidate master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3 3
1 2 1
2 3 1
1 3 2
3
Output
2
1 2
Sample 2of 2
Input
4 4
1 2 1
2 3 1
3 4 1
4 1 2
4
Output
4
2 3 4
545E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…