cf/mirror

Almost Sorted

CF
1508B1800· expert2s256 MB⌨ stdin/stdout

Examples

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