cf/mirror

Beautiful Permutation

CF
2162D1400· specialist2s256 MB⇄ interactive

Examples

Sample 1of 1
Input
2
 
 
3
 
4
 
5
 
 
4
 
8
 
8
 
9
Output
1 1 2
 
2 1 2
 
! 2 2
 
1 2 4
 
2 1 3
 
2 3 4
 
! 2 4
2162D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)