cf/mirror

Restoration of the Permutation

CF
67B1800· expert1s256 MB⌨ stdin/stdout
#greedy

Examples

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