cf/mirror

Build the Permutation

CF
1608B1200· pupil1s256 MB⌨ stdin/stdout

Examples

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