cf/mirror

The Strongest Build

CF
1574D2000· candidate master3s256 MB⌨ stdin/stdout

Examples

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