Slightly Decreasing Permutations
285A1100· newbie2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
5 2
Output
1 5 2 4 3
Sample 2of 3
Input
3 0
Output
1 2 3
Sample 3of 3
Input
3 2
Output
3 2 1
58%
285A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
5 2
1 5 2 4 3
3 0
1 2 3
3 2
3 2 1