#P311. 练52.3 插队
练52.3 插队
Description
There are people, each with their own ID, standing in a queue. Now, a person with ID wants to insert themselves after the -th person (not the person with ID ). Find the order of the queue after the insertion.
Input Format
The first line contains , the second line contains numbers representing the original queue order ().
The third line contains two numbers and .
Output Format
Output one line containing the order of the queue after the insertion.
Sample
5
1 2 3 4 5
2 71 2 7 3 4 5
Related
In following homework: