cf/mirror

Comparable Permutations

CF
2190C2300· international master2s256 MB⇄ interactive

Examples

Sample 1of 1
Input
3
5
 
1
 
4
 
1
 
0
 
1
 
0
 
9
Output
? 2 1
 
! 1 2 4 5 3
 
? 2 3
 
? 1 3
 
? 1 4
 
? 2 2
 
! -1
 
! 1 2 3 6 7 4 5 8 9
2190C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)