cf/mirror

Min Cost Permutation (Easy Version)

CF
1844F12600· international gm3s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
3
6 -7
3 1 4 1 5 9
3 2
1 3 5
1 2718
2818
Output
9 3 1 4 5 1
1 3 5
2818
1844F1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)