What will be the output?

ques- https://online.codingblocks.com/player/10161/content/5364
in this question what will be the output for the test case-
5 3
3 4 1 2 5

and for-
5 4
3 4 1 2 5

Mention problem name and link of hackerblock

I’m unable to find this problem on hackerblocks. Its a question from my course and its under C++ STL ques title is UNLOCK.
ques statement -
Shekhar is a bomb defusal specialist. He once encountered a bomb that can be defused only by a secret code. He is given a number N and a number K. And he is also given permutation of first N natural numbers . The defusal code is the largest permutation possible by doing exactly K swaps among a pair of the given permutation. Help him to find the final permutation.
In Input values of N and K are given.
sample input-
5 2
3 4 1 2 5
output-
5 4 3 2 1

what will be the output for the test case-
5 3
3 4 1 2 5
and
5 4
3 4 1 2 5

Both will be
5 4 3 2 1