cf/mirror

Constructing the Dungeon

CF
1346D1600· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
3
3 2
1 2 1
2 3 1
5 7
3 2 7
3 4 9
1 5 5
1 2 5
4 1 5
4 2 7
3 1 5
4 4
1 2 5
3 2 2
4 1 3
3 4 4
Output
YES
1 1 1
YES
5 7 9 9 5
NO
1346D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…