cf/mirror

Knight Tournament

CF
356A1500· specialist3s256 MB⌨ stdin/stdout

Examples

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