cf/mirror

Ordered Permutations

CF
2040C1600· expert2s256 MB⌨ stdin/stdout

Examples

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