Given 2 integers
We define the most efficient sorting of an array of integers as one where the number of swaps is minimized.
The input are generated such that an answer is guaranteed to exist.
Input Specification
The first and only line will contain
Output Specification
On one line, output the lexicographically greatest array that satisfies the conditions outlined in the problem statement.
Sample Input
Copy
4 3
Sample Output
Copy
4 3 1 2
Comments
Is it possible to not MLE in py3
If you need a hint, try to use
memory.
P.S. damn it c beat me to it.
Yes