cf/mirror

Permutation by Sum

CF
1512E1600· expert2s256 MB⌨ stdin/stdout

Examples

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